Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Forgetting about compinit with manual alteration of _comps
- X-seq: zsh-users 21258
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Forgetting about compinit with manual alteration of _comps
- Date: Tue, 9 Feb 2016 11:28:10 +0100
- 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 :content-transfer-encoding; bh=+nKm6jp5LoVBlQ/G++8whCHYMausqHM08l2Ok6oIK9U=; b=yO1JtEllQ74jQRjQB3a+jP1uVZVVaX/OOGtkkX55FyRv6A0M+zeXKgk+sg7igGZoBT yoql86eQ3Ir67t4V7POogCHgVv0EeJF5PtQJMdFqW+bkhxNw1K3ayJaqLs8E8agMc7cJ HLK3spF4fnBh4531XKo8sm06srVJhzQdoyJMinMik0249CHbwo0AxYOkc1HKnnyKILcJ IHu2ycXyVuvZrAPcjnwBq1X1pFC8fyr/VN2cdMi33+sN+PSj7xOBJahxbCbfIp3rNUWf QiQE5kE9o9hdgKTIK8tiY7UyvjKVS4JZMbH/naJjghyPEUNrMPe/mdqduqB+yoeLqeUD r2jw==
- 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
Hello,
one calls compinit in .zshrc and then loads something that adds to
$fpath having intention of providing a completion. User is puzzled as
completion doesn't work, has to take care of having compinit placed at
say bottom of .zshrc.
Turns out the loading could be followed by:
autoload -Uz _mycmd
_comps[mycmd]=_mycmd
and that sets things working, mycmd is correctly completed. This works
for trivial #compdefs, don't know what side effects can non-trivial
#compdefs have.
The bottom line is: a software package providing trivial completions
can do autoload/_comps alteration to make users happy. If they called
compinit before – completions will work. If they call compinit after –
completions will work also. Any nastiness in this?
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author