zsh-users
 help / color / mirror / code / Atom feed
From: joe M <joe9mail@gmail.com>
To: zsh-users@zsh.org, zsh-workers@zsh.org
Subject: Zsh completion configuration with history-words as another group to _complete
Date: Tue, 26 Feb 2013 01:09:20 -0500	[thread overview]
Message-ID: <CAHjjW152=f9aBk52CxpFWWioPi__U04eEktdW5iWVTkYSDMr6A@mail.gmail.com> (raw)

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


             reply	other threads:[~2013-02-26  6:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-26  6:09 joe M [this message]
2013-02-26  7:23 ` joe M
2013-02-26 16:33   ` Bart Schaefer
2013-02-26 16:26 ` Bart Schaefer

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='CAHjjW152=f9aBk52CxpFWWioPi__U04eEktdW5iWVTkYSDMr6A@mail.gmail.com' \
    --to=joe9mail@gmail.com \
    --cc=zsh-users@zsh.org \
    --cc=zsh-workers@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).