-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check gh command exists before setting git gh alias #1499
Conversation
f48b4f4
to
03905fd
Compare
gh
git alias and replaxce with ghome
gh
git alias and replace with ghome
As discussed in #1498, can you please add a check for the Bash-it provides the |
03905fd
to
9ef0b33
Compare
gh
git alias and replace with ghome
Updated - sorry for the delay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - left some feedback in a comment, please take a look.
aliases/available/git.aliases.bash
Outdated
# Git home | ||
alias ghm='cd "$(git rev-parse --show-toplevel)"' | ||
if ! _command_exists gh; then | ||
alias gh='cd "$(git rev-parse --show-toplevel)"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can simplify this by doing this - avoids repetition:
alias gh='ghm'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Thanks! |
Fixes #1498
gh
was forgit home
so I am renaming itghm