command-line - 纯提示安装问题

标签 command-line terminal zsh zshrc

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

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.

我认为这不应该出现的想法是否正确?此外,当我查看所有主题时,纯不存在。我该如何解决?

我的 .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。

关于command-line - 纯提示安装问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68048845/

相关文章:

Linux x-terminal 切换终端

c - 使用 C 在终端的 printf 输出中获取一个奇怪的百分号

shell - 如何在 zsh 中执行脚本然后变得可交互?

macos - 在 mac os x 上从 iterm2 中隐藏 name@name-macbook-air

rust 设置用户输入的光标位置

linux - 如何从终端用更多文件中的另一个字符串替换一个字符串?

ios - NSTask 或等效的 iPhone

windows - 如何通过命令行更改现有文件夹的图标? ( Windows 10)

Delphi 执行命令行命令

powershell - 使用参数从powershell提示符运行powershell