zsh-users
 help / color / mirror / Atom feed
* Completion order for approximate
@ 2020-12-04 16:49 A. Wik
  2020-12-04 17:00 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: A. Wik @ 2020-12-04 16:49 UTC (permalink / raw)
  To: zsh-users

Hi all,

I'm trying to set up the approximate expansion so that the original
string comes before the corrections in the menu.

This doesn't work:
zstyle ':completion:*:approximate:*' tag-order 'original corrections'

Test case: grpo<tab>
% gprof
corrections (errors: 1)
gprof      grog       grotty     groupdel   groupmod   growisofs  grpconv
groff      grops      groupadd   groupmems  groups     grpck      grpunconv
original:
grpo

"grpo" is a mistyped "grep".

Regards,
Albert.


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

* Re: Completion order for approximate
  2020-12-04 16:49 Completion order for approximate A. Wik
@ 2020-12-04 17:00 ` Peter Stephenson
  2020-12-05 14:08   ` A. Wik
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2020-12-04 17:00 UTC (permalink / raw)
  To: zsh-users


> On 04 December 2020 at 16:49 "A. Wik" <awik32@gmail.com> wrote:
> I'm trying to set up the approximate expansion so that the original
> string comes before the corrections in the menu.
> 
> This doesn't work:
> zstyle ':completion:*:approximate:*' tag-order 'original corrections'

You need:

zstyle ':completion:*:approximate:*' group-order original corrections

--- note also no quotes.  See group-order in the zshcompsys manual for more.
tag-order specifies the order completions are looked for, not the order they're
displayed in.  To specify an order, you need separate words on the command line;
values in the same set of quotes are treated as being together (sometimes useful
for tag-order, not for group-order).

pws


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

* Re: Completion order for approximate
  2020-12-04 17:00 ` Peter Stephenson
@ 2020-12-05 14:08   ` A. Wik
  0 siblings, 0 replies; 3+ messages in thread
From: A. Wik @ 2020-12-05 14:08 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-users

On Fri, 4 Dec 2020 at 17:00, Peter Stephenson
<p.w.stephenson@ntlworld.com> wrote:
>
>
> > On 04 December 2020 at 16:49 "A. Wik" <awik32@gmail.com> wrote:
> > I'm trying to set up the approximate expansion so that the original
> > string comes before the corrections in the menu.
> >
> > This doesn't work:
> > zstyle ':completion:*:approximate:*' tag-order 'original corrections'
>
> You need:
>
> zstyle ':completion:*:approximate:*' group-order original corrections
>
> --- note also no quotes.  See group-order in the zshcompsys manual for more.
> tag-order specifies the order completions are looked for, not the order they're
> displayed in.  To specify an order, you need separate words on the command line;
> values in the same set of quotes are treated as being together (sometimes useful
> for tag-order, not for group-order).
>
> pws

Thanks.  Incidentally, I'm reading (and intermittently following the
suggestions in) your book.

-aw


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

end of thread, other threads:[~2020-12-05 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 16:49 Completion order for approximate A. Wik
2020-12-04 17:00 ` Peter Stephenson
2020-12-05 14:08   ` A. Wik

zsh-users

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-users zsh-users/ http://inbox.vuxu.org/zsh-users \
		zsh-users@zsh.org
	public-inbox-index zsh-users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


code repositories for the project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git