Skip to content

Commit 97a83ff

Browse files
author
Noah Gorny
committed
aliases: Do not allow mix of git-zsh and git
1 parent 2c5e59d commit 97a83ff

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

aliases/available/git-zsh.aliases.bash

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# shellcheck shell=bash
22
cite 'about-alias'
3-
about-alias 'git aliases from oh-my-zsh'
3+
about-alias 'git aliases from oh-my-zsh (incompatible with regular git aliases option)'
44

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

710
# MIT License
811

aliases/available/git.aliases.bash

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
cite 'about-alias'
33
about-alias 'common git abbreviations'
44

5+
# We can use this variable to make sure that we don't accidentally clash with git-zsh aliases
6+
_bash_it_git_aliases_enabled=true
7+
58
alias g='git'
69
alias get='git'
710

0 commit comments

Comments
 (0)