Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Loading completion function from custom fpath



Hi Felipe,

Felipe Sateler wrote:
> fpath=('~/.zsh/functions' $fpath)

This doesn't work.

If you put the "~" into quotes (single or double, it doesn't matter) zsh
won't perform tilde-expansion. And thus, you'll end up with a string in
$fpath that starts with '~/' literally, like you pasted:

[...]
> ~/.zsh/functions

And I bet that's not a valid directory on you system. :)

Either leave the quotes off or use double quotes along with $HOME. The
following should be equivalent:

  fpath=(~/.zsh/functions $fpath)
  fpath=("$HOME/.zsh/functions" $fpath)

Either of them should work.

Regards, Frank



Messages sorted by: Reverse Date, Date, Thread, Author