微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

纯提示安装问题

如何解决纯提示安装问题

我尝试为我的终端安装纯提示,但我认为它不起作用。相反,每次我打开终端时,我都会在顶部看到这个:

Usage: prompt <options>
Options:
    -c              Show currently selected theme and parameters
    -l              List currently available prompt themes
    -p [<themes>]   Preview given themes (defaults to all)
    -h [<theme>]    display help (for given theme)
    -s <theme>      Set and save theme
    <theme>         Switch to new theme immediately (changes not saved)

Use prompt -h <theme> for help on specific themes.

我认为这不应该出现是正确的吗?此外,当我查看所有主题时,pure 并不存在。我应该如何解决这个问题?

我的 .zshrc 文件包含以下内容

setopt AUTO_CD
# initialise nice autocompletion
autoload -U compinit && compinit

# do not autoselect the first completion entry
unsetopt MENU_COMPLETE
unsetopt FLOW_CONTROL
# show completion menu on successive tab press
setopt AUTO_MENU
setopt COMPLETE_IN_WORD
setopt ALWAYS_TO_END

# use a pretty menu to select options
zstyle ':completion:*:*:*:*:*' menu select

# initialize pure prompt
autoload -U promptinit; promptinit
prompt pure

解决方法

你是如何安装 Pure 的?您需要确保它的目录是 added to your $fpath在您调用 promptinit 之前

fpath+=( /path/to/pure )
autoload -Uz promptinit
promptinit
prompt pure

——

注意:这适用于您想与 promptinit 一起使用的任何主题,而不仅仅是 Pure。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。