Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ssh host completion: ~/.ssh/config vs /etc/hosts



On Aug 11,  2:45pm, Moritz Bunkus wrote:
}
} > It seems a bit odd that this kicks in when there is no user-name part
} > in the word being completed.
} 
} Even adding user@ I would expect all possible hosts to be listed, not
} just the ones from /etc/hosts... To me the current behavior looks like a
} bug. Why should entries from /etc/hosts be exclusive in any shape or
} form? What makes them more special?

It's not (intended to be) /etc/hosts that's special, rather it's meant
to be the values in the user's explicit zstyles.  It just happens that
the "hosts" style has a default completion function _hosts, so that is
run by _combination, and _ssh_hosts has no way to know that the results
came from that default rather than from the literal styles.

This is the "[case] where this gives less than optimum behaviour" that
PWS speculated about in the patch in users/11333.



Messages sorted by: Reverse Date, Date, Thread, Author