Frage

Using oh-my-zsh, I've got the following at the bottom of .zshrc:

fortune | xargs -0 cowsay | lolcat -a

When run from .zshrc, it complains:

/Users/jorum/.zshrc:59: command not found: lolcat

Running it manually from the command line works:

➜  ~  fortune | xargs -0 cowsay | lolcat -a  
<insert colorful cow saying something insightful here>

Leaving lolcat -a out entirely also works (sans the colors of course).

Clearly, lolcat isn't missing:

➜  ~  gem list lolcat
*** LOCAL GEMS ***
lolcat (42.0.99)

Why does it not work if executed from within .zshrc?

War es hilfreich?

Lösung

Moving the line in question to .zlogin fixed the problem.

More specifically, I had to move it below this line that was added by RVM:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top