fix: replace invalid 'options' attr with setopt in initExtra
home-manager's programs.zsh has no 'options' attribute. Use 'setopt correct' and 'setopt interactive_comments' inside initExtra instead.
This commit is contained in:
@@ -14,11 +14,14 @@
|
|||||||
export PATH="$HOME/.hermes/node/bin:$PATH"
|
export PATH="$HOME/.hermes/node/bin:$PATH"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Shell 选项 - 对应 .zshrc 的 setopt
|
# Shell 选项 - 对应 .zshrc 的 setopt(NixOS 中需写在 initExtra 里)
|
||||||
options = [ "correct" "interactive_comments" ];
|
# options 属性在 home-manager 中不存在,用 setopt 命令代替
|
||||||
|
|
||||||
# 初始化 - 对应 .zshrc 中的 Powerlevel10k instant prompt 和函数定义
|
# 初始化 - 对应 .zshrc 中的 Powerlevel10k instant prompt 和函数定义
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
|
# Shell options
|
||||||
|
setopt correct
|
||||||
|
setopt interactive_comments
|
||||||
# Powerlevel10k instant prompt
|
# Powerlevel10k instant prompt
|
||||||
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
|
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
|
||||||
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
|
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
|
||||||
|
|||||||
Reference in New Issue
Block a user