Unset Alias In Oh My Zsh
自己最近一直在使用Oh My Zsh。今天我发现
Oh My Zsh
附带的gds (alias)
和我本地的一个命令冲突了,于是学习了一下解决冲
突的方法,在此记录下来。
在命令行中查看当前gds
的含义:
$ which gds
gds: aliased to git diff --staged
在~/.zshrc
中加入如下语句取消gds
设定:
# ~/.zshrc
# unset oh-my-zsh's gds which is alias to 'git diff --staged'
# so my /home/guosj/.local/bin/gds works instead
unalias gds
重载~/.zshrc
:
$ . ~/.zshrc
再次查看gds
的含义:
$ which gds
/home/guosj/.local/bin/gds
参考How to unset aliases set by Oh My Zsh。
以上。