我在我的zshrc中有一个定制的别名为`ls -als“ la”,并且它被``ls -lah''的东西所覆盖。这是从哪里来的?
我在.zshrc < / code>中有以下内容,
alias la="ls -als"
并且被覆盖了
▶︎ which la
la: aliased to ls -lAh
为什么会发生这种情况 /它可能来自哪里?
I have the following in my .zshrc
alias la="ls -als"
And it's being overwritten
▶︎ which la
la: aliased to ls -lAh
Why is this happening / where might it be coming from?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在很大程度上帮助了 https://stackoverflow.com/a/26742455/413254 在
〜/.oh-my-zsh/lib/directories.zsh
中,有一些内置目录别名内置的别名。您可以通过几种方式解决此问题:
la
别名更改为其他.oh-my-zsh
文件,我的
。.zshrc
中的来源$ zsh/oh-my-zsh.sh.sh源$ zsh/oh-my-zsh.sh.sh.sh
源基本上所有内容。
Helped largely by https://stackoverflow.com/a/26742455/413254, it turns out that oh-my-zsh has some built in directory aliases in
~/.oh-my-zsh/lib/directories.zsh
one of which overwrote my custom one!You could resolve this in a few ways:
la
alias to something else.oh-my-zsh
filesource $ZSH/oh-my-zsh.sh
in my.zshrc
. Thatsource $ZSH/oh-my-zsh.sh
sources basically everything in.oh-my-zsh/lib
I went with the last option.