Angelmmiguel / pm

The easy way to switch between your projects on ZSH
MIT License
193 stars 17 forks source link

Document how to install autocomplete on zsh without oh-my-zsh #8

Closed dereckson closed 6 years ago

dereckson commented 6 years ago

Currently, README assumes zsh reader has oh-my-zsh installed, as the plugins variable is parsed for autocompletion by oh-my-zsh:

# Add all defined plugins to fpath. This must be done
# before running compinit.
for plugin ($plugins); do
  if is_plugin $ZSH_CUSTOM $plugin; then
    fpath=($ZSH_CUSTOM/plugins/$plugin $fpath)
  elif is_plugin $ZSH $plugin; then
    fpath=($ZSH/plugins/$plugin $fpath)
  fi
done

For non oh-my-zsh installations, the easiest is to follow zsh guidelines and use the /usr/local/share/zsh/site-functions/ folder, imagined to get local commands autocomplete files.

This is where FreeBSD put completion files for pkg, portmaster, this is where rust put completion file for cargo, etc. The folder exists on Debian too.

Angelmmiguel commented 6 years ago

You're right. I forgot to check the docs for a standard ZSH installation. Thanks for the fix!