From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: Bart Schaefer <schaefer@brasslantern.com>,
Matt Woodson <mwoodson@gmail.com>,
zsh-users@zsh.org
Subject: Re: known hosts tab completion
Date: Sun, 24 Jun 2012 09:39:47 +0100 [thread overview]
Message-ID: <20120624083947.GA2768@tarsus.local2> (raw)
In-Reply-To: <CAHYJk3Q5UhvykJ3D3JmaAE8v2DaYDi0jGYo2wX_dhdMuVzPuMA@mail.gmail.com>
Mikael Magnusson wrote on Sat, Jun 23, 2012 at 20:28:00 +0200:
> On 23 June 2012 20:18, Bart Schaefer <schaefer@brasslantern.com> wrote:
> > On Jun 22, 2:48pm, Matt Woodson wrote:
> > }
> > } Let's say I have these hosts:
> > }
> > } host01.stage.example.com
> > } host02.stage.example.com
> > } host01.prod.example.com
> > } host02.prod.example.com
> > }
> > } now, in my prompt, I will type:
> > }
> > } $ ssh hos<tab>
> > }
> > } zsh will show me:
> > }
> > } $ ssh host..example.com
> > }
> > } with the cursor right after "host" and shows me a menu with the host
> > } names in it. I like the menu showing me hostnames, I just don't want
> > } it to complete everything.
> >
> > This similar to the confusion about the default matcher-list that was
> > discussed about a month ago in the "completion oddity" thread (starts
> > with zsh-users/17099 if you want to check the archives).
> >
> > In this case, though, the default matcher-list does not include the
> > dot character, so you must have a zstyle that does. Disable it for
> > this context and you should be able to get the behavior you want.
>
> The default matcher-list for host completion does have the . in it, or
> rather it uses a hardcoded compadd -M 'm:{a-zA-Z}={A-Za-z} r:|.=*
> r:|=*', as do a couple of other completions. zsh -f gives me the
> "magic" behaviour with just compinit, and I don't think you can
I get the same behaviour I describe in the original post under 'zsh -f'
with compinit, too.
> override compadd -M 'foo' provided stuff with styles.
>
> --
> Mikael Magnusson
next prev parent reply other threads:[~2012-06-24 8:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-22 18:48 Matt Woodson
2012-06-23 18:18 ` Bart Schaefer
2012-06-23 18:28 ` Mikael Magnusson
2012-06-24 8:39 ` Daniel Shahaf [this message]
2012-06-23 22:48 ` Matt Woodson
-- strict thread matches above, loose matches on Subject: below --
2012-04-04 7:58 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=20120624083947.GA2768@tarsus.local2 \
--to=d.s@daniel.shahaf.name \
--cc=mikachu@gmail.com \
--cc=mwoodson@gmail.com \
--cc=schaefer@brasslantern.com \
--cc=zsh-users@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).