Skip to content

Commit

Permalink
aliases: Do not allow mix of git-zsh and git
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Gorny committed Feb 6, 2021
1 parent 53894cd commit 051da8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions aliases/available/git-zsh.aliases.bash
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# shellcheck shell=bash
cite 'about-alias'
about-alias 'git aliases from oh-my-zsh'
about-alias 'git aliases from oh-my-zsh (incompatible with regular git aliases option)'

# We are not vendoring this, as we need to adapt it to bash :(
if [[ -n $_bash_it_git_aliases_enabled ]]; then
_log_error "git-zsh aliases are incompatible with regular git aliases"
return
fi

# MIT License

Expand Down
3 changes: 3 additions & 0 deletions aliases/available/git.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
cite 'about-alias'
about-alias 'common git abbreviations'

# We can use this variable to make sure that we don't accidentally clash with git-zsh aliases
_bash_it_git_aliases_enabled=true

alias g='git'
alias get='git'

Expand Down

0 comments on commit 051da8a

Please sign in to comment.