Host name completion is extremely frustrating in ZSH when dealing with similar names in work environments. I do not believe there is a way to change the default behavior, so I am reporting this here. I have posted on the zsh mailing list with no help, so I am posting this here asking for a way for this to change.
Problem:
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
<tab> = me hitting tab
| = cursor position
I TYPE:
$ ssh hos<tab>
ZSH SHOWS:
$ ssh host.|.example.com
with the cursor right after "host" and shows me a menu with the host
names in it. I then continue to type "stage"
$ ssh host.stage<tab>.example.com
and I am presented this mess:
$ ssh host|.stage.example.com.example.com
I then type this in (hopefully it will fix itself):
$ ssh host01<tab>.stage.example.com.example.com
and I get a bigger mess:
$ ssh host01.|.example.com.stage.example.com.example.com
I type this:
$ ssh host01.stage<tab>.example.com.stage.example.com.example.com
and I get this:
$ ssh host01.stage.example.com |.example.com.stage.example.com.example.com
A control-k takes care of it at this point, but it's a much longer process than it needs to be.
============================
Potential solutions.
1. Change the way it tab completes entirely, and by default something like this:
A preferred way would be to not complete the rest of the host name.
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
2. If people still prefer the way I described above, provide an option to enable default tab completion (as described in #1)
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"