zplug: zsh: command not found: zplug

Describe the bug I cannot run zplug after having installed it using CURL it says command not found for zsh

Env (please complete the following information):

  • zplug version: can’t
  • zsh --version: zsh 5.7.1 (x86_64-apple-darwin19.0.0)
  • uname -a: Darwin Macbook.local 19.2.0 Darwin Kernel Version 19.2.0: Sat Nov 9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64 x86_64

Minimal zshrc (with less than 30 lines)

Create a minimal reproducing set of configurations for this issue. Please remove all unnecessary parts!

source ~/.zplug/init.zsh
ZSH_THEME="avit"

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

zplug is a function, not a program.

You need to find where brew put zplugs init.zsh and source it.

My ~/.zshrc contains the following:

if [ -f ${HOME}/.zplug/init.zsh ]; then
    source ${HOME}/.zplug/init.zsh
fi

Obviously not installed via brew though 😄

The brew formula page also says the following (formatting mine):

In order to use zplug, please add the following to your .zshrc:

export ZPLUG_HOME=$(brew --prefix)/opt/zplug
source $ZPLUG_HOME/init.zsh

Perhaps this should be added to the README.md as well, such that this information is easier to discover?

Why in the world does the readme not include this step? That’s ridiculous.

This is so ridiculous. WHy is it built this way:

➜  ~ curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh
 ✔  Checking if your zsh version is newer than 4.1.9 [SUCCEEDED]
 ✔  Installing zplug to /Users/mentor/.zplug [SUCCEEDED]
 All processes are successfully completed 🎉
 For more information, see http://zplug.sh 🌺
 Enjoy zplug!
➜  ~ zplug "lukechilds/zsh-nvm"
zsh: command not found: zplug

The install script should make the necessary changes itself. That’s the point of having an install script.

Or at the very least, it should tell the user to do these changes. Rather than just saying “all sorted, enjoy”.

The script should either add that code to the zshrc file, or inform the user to do so.

I completely missed that there are extra steps to complete the installation.

This solved the issue for me:

My ~/.zshrc contains the following:

if [ -f ${HOME}/.zplug/init.zsh ]; then
    source ${HOME}/.zplug/init.zsh
fi

It lacks zplug load at endfile.