Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: known hosts tab completion
- X-seq: zsh-users 17161
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: known hosts tab completion
- Date: Sun, 24 Jun 2012 09:39:47 +0100
- Cc: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Matt Woodson <mwoodson@xxxxxxxxx>, zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:content-transfer-encoding :in-reply-to; s=mesmtp; bh=jKzAOELqConzpxVdUdmCcO/18c8=; b=aJakD eNhD8n3ptGD1GKMlkZwfGeA5mKz/Ge2Wf6FtGQiwJj9gDn9+cFHFoC8ikIoClmoQ QN70QBeGEQrSy02Ntxok2Ws3oxKXLIOvfVvJYxXa6OG/IWopU3GZBt/plsp+4XVx vYQEdx3rl7jBgWGlPkdTGP91UAWKgHtJdDtvgI=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:content-transfer-encoding :in-reply-to; s=smtpout; bh=jKzAOELqConzpxVdUdmCcO/18c8=; b=YIMa kQzOT/kQM5tJl6mgyTDXskupQEnZQ/iFWATk+v5ReN1uk8/DcuTBdXCxk8zG8yl0 2ka8nUCjbM5+wk/gTdo0c2cWSpcX+BSvQmFq936wzktaEyfnzjoYa0A0duP/jBwR M3ujeFaIW2PJ6jrA12qC0FefMzkwDibAGTcwV/I=
- In-reply-to: <CAHYJk3Q5UhvykJ3D3JmaAE8v2DaYDi0jGYo2wX_dhdMuVzPuMA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAMcVnE1Q8DU-DhY+5mxOJi4FLD_T4oWajJ+ANoAy9a8GmEF3qQ@mail.gmail.com> <120623111812.ZM13306@torch.brasslantern.com> <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@xxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author