diff --git a/home/zsh.nix b/home/zsh.nix index 429232f..6496206 100644 --- a/home/zsh.nix +++ b/home/zsh.nix @@ -14,11 +14,14 @@ export PATH="$HOME/.hermes/node/bin:$PATH" ''; - # Shell 选项 - 对应 .zshrc 的 setopt - options = [ "correct" "interactive_comments" ]; + # Shell 选项 - 对应 .zshrc 的 setopt(NixOS 中需写在 initExtra 里) + # options 属性在 home-manager 中不存在,用 setopt 命令代替 # 初始化 - 对应 .zshrc 中的 Powerlevel10k instant prompt 和函数定义 initExtra = '' + # Shell options + setopt correct + setopt interactive_comments # Powerlevel10k instant prompt if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"