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

Re: Loading completion function from custom fpath



On Wed, Jul 31, 2013 at 3:01 AM, Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> wrote:
> Hi Felipe,

Hi Frank,

>
> 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.

Now I feel really stupid. I thought I tried the unquoted path before
(indeed I ended up with the quoted path trying different versions).
Indeed unquoting it works!

Thanks for your help!


-- 

Saludos,
Felipe Sateler



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