Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: known hosts tab completion
- X-seq: zsh-users 17159
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: known hosts tab completion
- Date: Sat, 23 Jun 2012 20:28:00 +0200
- Cc: Matt Woodson <mwoodson@xxxxxxxxx>, zsh-users@xxxxxxx, d.s@xxxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=7qsaPGqbLkDsc6MWdlPLdYvyggHZLaA/NBweB8DFWeA=; b=03ocue8CX+DMiQvcbOt2pq9h/rVpxyJgthuPGREAIT2KhgNAk8FtgtYiT7UT6emfFu 7iiX04qjy/pcmk+4it6fT7j3/TmbuPzAP9sBadCjmElmQpA6eHqumHUN6qnK1OlkCOWQ EHnPowRSuJSSbn/ou2Za5uXe+TCsuxIUcvkQu6go309HEQM89alu+MfA2pTW4xiY8V+l 99JvscEM9y0U8+QzzpkqZSMggpNgd94yBVRKhJum5dBQ9ZPs2dAm/9WY54Rc0eVym/R4 ItDlEnlpPzNRIkyLmF+HBB4xqS2e5vV9aY2OeFSu0YFuUzHg4P796DVvNdTJ8p1JgGAC e9Rg==
- In-reply-to: <120623111812.ZM13306@torch.brasslantern.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>
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
override compadd -M 'foo' provided stuff with styles.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author