From: Felipe Sateler <fsateler@gmail.com>
To: zsh-users@zsh.org
Subject: Loading completion function from custom fpath
Date: Tue, 30 Jul 2013 19:18:45 -0400 [thread overview]
Message-ID: <CAAfdZj9bH2w8oUZYZdN10EKO1AVuLUG2m=VFSs13KrfuLwjbng@mail.gmail.com> (raw)
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
next reply other threads:[~2013-07-30 23:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 23:18 Felipe Sateler [this message]
2013-07-31 7:01 ` Frank Terbeck
2013-07-31 13:59 ` Felipe Sateler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAfdZj9bH2w8oUZYZdN10EKO1AVuLUG2m=VFSs13KrfuLwjbng@mail.gmail.com' \
--to=fsateler@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).