问题描述
我正在尝试调试为什么setopt
调用在我尝试进行脚本source
时失败的原因:
/Users/.../.shell_config: line 6: setopt: command not found
这是配置:
zshrc
:
# Load the shell dotfiles
for file in $HOME/.{shell_exports,shell_aliases,shell_functions,shell_config}; do
[ -r "$file" ] && [ -f "$file" ] && source "$file";
done;
unset file;
shell_config
:
# History
HISTFILE=~/.zsh_history
HISTSIZE=1000
SAVEHIST=1000
setopt inc_append_history
setopt hist_ignore_all_dups
setopt extended_glob
unsetopt share_history
unsetopt beep
zstyle :bracketed-paste-magic paste-init pasteinit
zstyle :bracketed-paste-magic paste-finish pastefinish
当shell_config
被source
时,每个setopt
的呼叫都会出现错误:
setopt: command not found
但是,如果我手动调用setopt
(即将行粘贴到终端中),则不会出错。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)