Zsh
.zshrc 別名不適用於 powerlevel10k
繼續執行
Raspbian GNU/Linux 11 (bullseye)
我為 zsh 安裝了powerlevel10k shell 主題,但我的別名似乎不起作用(例如
zsh: command not found: ll
),我不知道為什麼……我的 .zshrc 看起來像這樣:
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block; everything else may go below. if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi source ~/shelltools/powerlevel10k/powerlevel10k.zsh-theme # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh source ~/shelltools/powerlevel10k/powerlevel10k.zsh-theme source ~shelltools/powerlevel10k/powerlevel10k.zsh-theme # git aliases alias gca='git add .&&git commit -m ' alias gph='git push' alias gpl='git pull' alias gc='git checkout' alias gcb='git checkout -b ' alias gcp='git checkout production' alias gmp='git merge production' alias gcd='git checkout develop' alias gmd='git merge develop' # some more ls aliases alias ll='ls -l' alias la='ls -A' alias l='ls -CF'
別名是在行之後聲明的
source
,所以我認為它們沒有被覆蓋..
不確定最終導致問題的原因,但是重新安裝 zsh 和 powerlevel10k 主題(手動安裝)就可以了。