.zshrc 别名不适用于 powerlevel10k

.zshrc 别名不适用于 powerlevel10k

运行于Raspbian GNU/Linux 11 (bullseye)

我安装了功率等级10kzsh 的 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,所以我认为它们没有被覆盖。

答案1

不确定最终是什么导致了问题,但是重新安装了 zsh 和 powerlevel10k 主题(手动安装)成功了..

相关内容