Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Zsh completion configuration with history-words as another group to _complete
- X-seq: zsh-workers 31068
- From: joe M <joe9mail@xxxxxxxxx>
- To: zsh-users@xxxxxxx, zsh-workers@xxxxxxx
- Subject: Zsh completion configuration with history-words as another group to _complete
- Date: Tue, 26 Feb 2013 01:09:20 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=hKOFYOpJYNU4Dck1vadeerDhU/wP0B/3f2GAPTqGSaA=; b=WcssDxY9bqjKr0FTo14PTR/0Yz9kau3Cyclfbtzm3YMjp4PJun2u22u7JJpe6A6plb nYseuc55msk3glFOLTwcDhvbUW8DKkzKQIajeDp6oJKYif6N1/Q9ZNCUon+vMFAg0KE4 6gUqP8KATkZwJAh78WhW8zoSZouXthuKZEFS5FqHhlJc007z6LYm1eXWCYarOWTvLw2R YFBIBakIgQfx5seDClpueRhsuWX+Xu9mHHRsh3V99/Ba/HAgJORLUw8msdKr1rn1y5NA +zfJkDnANrtlYYamP/r3nqMkF1M7EoSTiTSyKI3wni2/s6WJCQUo2SGlON4YVko58QeD zrGQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hello,
I am trying to figure out how to add "history-words" as a group within
_complete, similar to aliases or functions.
zstyle -e ':completion:*' completer \
'compprefuncs=(_history_word_list) reply=(_complete _match
_approximate _ignored _prefix)'
cat /usr/share/zshcat
/usr/share/zsh/5.0.2/functions/Completion/Base/_history_word_list
#autoload
_history "$@"
return 0/5.0.2/functions/Completion/Base/_history_word_list
#autoload
_history "$@"
return 0
The list of history-words show up along with any other groups shown by
_complete or any of the completers in "reply". But, unfortunately, it
does not execute the matched word with one Enter keypress. I need to
press Enter twice for the history word to be used.
I am not sure if the above is the correct approach to this issue, or,
if I should be looking at changing _complete to add the
_history_words_list as a tag within the _complete function instead.
Any thoughts, please?
Thanks
Joe
Messages sorted by:
Reverse Date,
Date,
Thread,
Author