4

I tried to install pure prompt for my terminal, but I don't think it has worked. Instead everytime I open terminal, I get this at the top:

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.

Am I correct in thinking this is not supposed to show up? Also when I view all the themes, pure is not there. How should I resolve this?

My .zshrc file contains the following:

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
chunzg
  • 145
  • 1
  • 3
  • 8

1 Answers1

2

How did you install Pure? You need to make sure its directory is added to your $fpath, before you call promptinit:

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

—-

Note: This goes for any theme you want to use with promptinit, not just Pure.

Marlon Richert
  • 5,250
  • 1
  • 18
  • 27
  • Thanks very much it worked! I followed the manual instructions in the link you gave. It's weird bc I initially installed via Homebrew which should automatically have done the $fpath right? Anyway thanks! – chunzg Jun 20 '21 at 10:10
  • 1
    I just tried installing Pure through Homebrew and it correctly installs `prompt_pure_setup` to `/usr/local/share/zsh/site-functions`, which is in every Zsh user's `$fpath` by default. Have you perhaps removed `/usr/local/share/zsh/site-functions` from your `$fpath`? That can happen if you do `fpath=( ... )` instead of `fpath+=( ... )`, for example. – Marlon Richert Jun 20 '21 at 19:43
  • 1
    On M1 Macs the default homebrew installation location has changed to `/opt/homebrew/share/zsh/site-functions` – Just The Highlights Mar 25 '22 at 09:11