Closed jawira closed 8 months ago
Unfortunately, as far as we define aliases with short names, any aliases can conflict with aliases and commands from other frameworks. In this sense, renaming alias gk
to another name wouldn't resolve the root cause of the problem. Actually, possible name conflicts are inevitable in principle with any names of aliases.
Then, what we can do here is to ask each user to choose a preferred one and resolve the conflicts.
I can disable "gk" alias myself, but it will be re-enabled with the next update.
Did you actually confirm that the gk
alias is re-enabled by the oh-my-bash (OMB) update? It depends on how you disable the gk
alias, but I don't think it will be re-enabled with the OMB update.
gk
alias by specifying unalias gk
after source /path/to/oh-my-bash.sh
in your .bashrc
. In this case, even if you update OMB, the line unalias gk
is still present in your .bashrc
, so the alias will not be enabled.gk
alias by customizing the git
plugin following Customization of Plugins and Themes - README. In this case, the customized version of the plugin has always higher precedence than the bundled one, so the gk
alias will never be re-enabled by the OMB update.gk
alias by directly editing the plugin file in the repository. In this case, the OMB update will be blocked because the OMB update checks if there are any uncommitted changes in the repository and cancels the update if any. You need to commit your changes and, depending on your .gitconfig
, you need to manually merge or resolve conflicts using the standard git
commands. Anyway, the gk
alias will not be re-enabled automatically.I wasn't expecting such a complete answer :) I will try your solutions. Thank you !
There's an alias collision from oh-my-bash "gk" alias https://github.com/ohmybash/oh-my-bash/blob/07d9382938b3c82b2d5daad923ccb4890a12c350/plugins/git/git.plugin.sh#L375
and Gitkraken cli tool https://www.gitkraken.com/cli wich also uses "gk".
I can disable "gk" alias myself, but it will be re-enabled with the next update.
Is there a way to set some sort of precedence, use current command "gk" instead of alias if the command exists ?
Thanks in advance.