From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: How to insert completions on command line
Date: Sat, 19 Aug 2006 20:16:27 -0700 [thread overview]
Message-ID: <060819201627.ZM28979@torch.brasslantern.com> (raw)
In-Reply-To: <20060819234130.GA11224@ay.vinc17.org>
On Aug 20, 1:41am, Vincent Lefevre wrote:
} Subject: Re: How to insert completions on command line
}
} On 2006-08-19 11:17:54 -0700, Bart Schaefer wrote:
} > zle -C all-matches complete-word _generic
} > bindkey '^Xa' all-matches
} > zstyle ':completion:all-matches:*' old-matches only
} > zstyle ':completion:all-matches::::' completer _all_matches
}
} I've tried for instance: mail ^Xa
} but the ^Xa has no effect, whereas [Tab] lists all the possible
} completions.
I had forgotten (and the manual, from which I copied those lines, doesn't
state directly) how _all_matches works. You have to first generate the
list of completions with a normal completer (such as by pressing tab) and
then type ^Xa to insert them on the line. _all_matches doesn't generate
any completions of its own.
To get the effect of having ^Xa both generate and insert completions,
you need:
zle -C all-matches complete-word _generic
bindkey '^Xa' all-matches
zstyle ':completion:all-matches:*' insert yes
zstyle ':completion:all-matches::::' completer \
_all_matches _complete
Replace or augment _complete with whatever other completers you want,
but _all_matches must come first.
next prev parent reply other threads:[~2006-08-20 3:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-18 23:47 Mikael Magnusson
2006-08-19 3:53 ` Bart Schaefer
2006-08-19 5:15 ` Mikael Magnusson
2006-08-19 18:17 ` Bart Schaefer
2006-08-19 19:38 ` Mikael Magnusson
2006-08-19 23:41 ` Vincent Lefevre
2006-08-20 3:16 ` Bart Schaefer [this message]
2006-08-20 22:09 ` Vincent Lefevre
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=060819201627.ZM28979@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@sunsite.dk \
/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).