zsh-users
 help / color / mirror / code / Atom feed
* Zsh completion configuration with history-words as another group to _complete
@ 2013-02-26  6:09 joe M
  2013-02-26  7:23 ` joe M
  2013-02-26 16:26 ` Bart Schaefer
  0 siblings, 2 replies; 4+ messages in thread
From: joe M @ 2013-02-26  6:09 UTC (permalink / raw)
  To: zsh-users, zsh-workers

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-26 16:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-26  6:09 Zsh completion configuration with history-words as another group to _complete joe M
2013-02-26  7:23 ` joe M
2013-02-26 16:33   ` Bart Schaefer
2013-02-26 16:26 ` Bart Schaefer

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