[bash] improve going to root scm functions