Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Loading completion function from custom fpath
- X-seq: zsh-users 17899
- From: Felipe Sateler <fsateler@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Loading completion function from custom fpath
- Date: Tue, 30 Jul 2013 19:18:45 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=TbTH5Rmb36MVlKIPzPJot+hwdJnt64OzctUSFsRQv3Q=; b=elaGjmtBO11Z+Nd6FYgFIFAsPO9DmSPtuzkoP1tDe/s4YrAzqx8Opw5HFbqPES7nYN AMsoLYz6FgJ7weDc1ZKGUwu2JgiuSiBQXOC1Qf3kn9Nv/G21g/6BfnxWKbb7jzFqL6P8 N1GZLzbnZgbEesQpYyvJ2oYm51xtbQFH+rv0Kb+V6h7nTcDekiLwLYRrKrC4y17K/kvS onztPPEi6hkbBTjGe6c9km9aLFTNr8qbRdZ9gfpNxlYy8r/GIJ/Nsmhs4t3OPO6ETo78 gO3oc+URbj3lbBokWuSnMoLYBJOpvTP/bMFqwHI4gbOBg7c/mnKUBgjCs+WDojtSPUNC yoGQ==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi all,
I'm having some issues with zsh that I hoped you could give some help.
I'm trying to add custom completion functions (I'm trying to create a
new one). However, as I do not want to use root, I want the new
completion functions to live within my $HOME. Google tells me that all
that I needed to do is create a directory, add it to fpath in my
zshrc, and be done with it. However, this doesn't work.
My zshrc says:
=====
fpath=('~/.zsh/functions' $fpath)
zstyle :compinstall filename '/home/felipe/.zshrc'
autoload -Uz compinit
compinit
=====
I have deposited a completion for the gbp command in
~/.zsh/functions/_gbp, yet the completion system doesn't pick it up (I
am removing .zcompdump and then restarting zsh to test).
This output is interesting:
% _gbp
zsh: command not found: _gbp
% autoload -U _gbp
% _gbp
zsh: _gbp: function definition file not found
Interestingly enough, if I do:
% sudo ln -s ~/.zsh/functions/_gbp /usr/share/zsh/vendor-completions/_gbp
The completion is picked up by the system, and the _gbp function now exists:
% _gbp
_arguments:comparguments:312: can only be called from completion function
_arguments:comparguments:312: can only be called from completion function
My fpath is:
% echo $fpath
~/.zsh/functions /usr/local/share/zsh/site-functions
/usr/share/zsh/vendor-functions /usr/share/zsh/vendor-completions
/usr/share/zsh/functions/Calendar /usr/share/zsh/functions/Chpwd
/usr/share/zsh/functions/Completion
/usr/share/zsh/functions/Completion/AIX
/usr/share/zsh/functions/Completion/BSD
/usr/share/zsh/functions/Completion/Base
/usr/share/zsh/functions/Completion/Cygwin
/usr/share/zsh/functions/Completion/Darwin
/usr/share/zsh/functions/Completion/Debian
/usr/share/zsh/functions/Completion/Linux
/usr/share/zsh/functions/Completion/Mandriva
/usr/share/zsh/functions/Completion/Redhat
/usr/share/zsh/functions/Completion/Solaris
/usr/share/zsh/functions/Completion/Unix
/usr/share/zsh/functions/Completion/X
/usr/share/zsh/functions/Completion/Zsh
/usr/share/zsh/functions/Completion/openSUSE
/usr/share/zsh/functions/Exceptions /usr/share/zsh/functions/MIME
/usr/share/zsh/functions/Misc /usr/share/zsh/functions/Newuser
/usr/share/zsh/functions/Prompts /usr/share/zsh/functions/TCP
/usr/share/zsh/functions/VCS_Info
/usr/share/zsh/functions/VCS_Info/Backends
/usr/share/zsh/functions/Zftp /usr/share/zsh/functions/Zle
My zsh is 5.0.2 on amd64, debian linux.
So, the question is: why is the completion function not loaded when on
my own defined fpath dir? How can I make zsh load it?
I will of course provide any extra info necessary. Please CC me on
replies, as I'm not subscribed.
--
Saludos,
Felipe Sateler
Messages sorted by:
Reverse Date,
Date,
Thread,
Author