zsh-users
 help / color / mirror / code / Atom feed
From: Matt Woodson <mwoodson@gmail.com>
To: zsh-users@zsh.org
Cc: d.s@daniel.shahaf.name
Subject: Re: known hosts tab completion
Date: Fri, 22 Jun 2012 14:48:19 -0400	[thread overview]
Message-ID: <CAMcVnE1Q8DU-DhY+5mxOJi4FLD_T4oWajJ+ANoAy9a8GmEF3qQ@mail.gmail.com> (raw)

I am reviving this question from a few months ago.  I have asked this
question on stack exchange, and didn't get any answers.  I am really
hoping someone here can help me out.

http://unix.stackexchange.com/questions/35483/zsh-host-name-completion-behaviour-change

I have been using ZSH to do host name completion, and want to change
the default behaviour. When I have multiple hosts with similar names,
the completion does stuff that I don't care for. An example is best:

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. Weird things happen. Most of the time I tab
through and either have to delete host names or have extra stuff on
the line i have to delete.

A preferred way would be to not complete the rest of the hostname.
something like:

$ ssh hos<tab>

zsh would hopefully show me:

$ ssh host
host01.stage.example.com  host01.prod.example.com
host02.stage.example.com  host02.prod.example.com

I have also noticed when i start putting in host names like:

host-server01.stg.example.com
host-server01.prod.example.com

and I do my "ssh host<tab>", it will take me to the subdomain first.

All i really want is this to complete like normal completion, and not
dance around on me.  Any thoughts?


             reply	other threads:[~2012-06-22 18:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22 18:48 Matt Woodson [this message]
2012-06-23 18:18 ` Bart Schaefer
2012-06-23 18:28   ` Mikael Magnusson
2012-06-24  8:39     ` Daniel Shahaf
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=CAMcVnE1Q8DU-DhY+5mxOJi4FLD_T4oWajJ+ANoAy9a8GmEF3qQ@mail.gmail.com \
    --to=mwoodson@gmail.com \
    --cc=d.s@daniel.shahaf.name \
    --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).