4 ms·
i mostly use this to go from inside a repo up to the root: alias rr='cd $(git rev-parse --show-toplevel)'
by arccy 2y ago
i mostly use this to go from inside a repo up to the root:
alias rr='cd $(git rev-parse --show-toplevel)'
- AdieuToLogic 2y agoThis is certainly a viable alternative to requiring a project-specific environment variable. The downside is it can only succeed if $PWD is within the local git repo. If this is the preferred approach, however, an alternative zsh definition for devhome could be: devhome () { cd $(git rev-parse --show-toplevel) && cd ./${~1}(/) }