zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: [Bulk] Re: [PATCH] Add xxd completion
Date: Sat, 11 Oct 2014 09:19:35 -0700	[thread overview]
Message-ID: <141011091935.ZM1151@torch.brasslantern.com> (raw)
In-Reply-To: <11354.1413020781@thecus.kiddle.eu>

} Daniel Shahaf wrote:
}  
} > Done.  'xxd -grou<tab>' now DTRTs; however, 'xxd -g<tab>' gives me:
} > 
} >     % xxd -g<tab>
} >     -groupsize  -- specify the number of octets per group
} > 
} > and the display doesn't change even if I press <tab> again. This
} > seems odd: why am I not offered both -g and -groupsize as possible
} > completions?

At this point in the completion, "-g" is an ignored prefix of the
"-g+" completion, which means it is part of the word to be completed
but should not be shown in the list of matches.  So it isn't.

} > And if "-groupsize" is offered in the message, why does pressing
} > <tab> not complete the command-line word to the one possible
} > completion?

The listing doesn't change on subsequent TABs because the fact that -g
is a possible completion makes -groupsize ambiguous.  You have to do
something to disambiguate, e.g., type a number (of octets) or an "r"
before pressing TAB.

On Oct 11, 11:46am, Oliver Kiddle wrote:
}
} It'll perhaps seem clearer if you set the format style with the
} descriptions tag

We had a brief discussion a few weeks ago of supplying a set of default
zstyles, I've been gradually building up a suggested list.  Both of
these were the first things on it:

}   zstyle ':completion:*:descriptions' format '%B%d%b'
}   zstyle ':completion:*' group-name ''
} 
} This makes it clearer that you have two groups, one of which has no
} associated matches, just a heading.
} 
} What subsequent tab presses does, depends a lot on your configuration.

In this case it doesn't, really; because one of the groups is empty,
there's not much else that can happen, e.g., menu completion has no
alternatives to cycle through.


  reply	other threads:[~2014-10-11 18:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08  8:20 Daniel Shahaf
2014-10-08 14:35 ` Oliver Kiddle
2014-10-09  8:21   ` Daniel Shahaf
2014-10-11  9:46     ` [Bulk] " Oliver Kiddle
2014-10-11 16:19       ` Bart Schaefer [this message]
2014-10-18 14:08         ` Daniel Shahaf
2014-10-11 21:25       ` Daniel Shahaf

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=141011091935.ZM1151@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --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).