Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • thank you, but this does not work as I wanted: 1) touch SSS.TXT ; scp -rp S<TAB> still offers completion for server.domain.org from /etc/hosts. It should only offer completion of local file S*, if it exists. 2) ssh S<TAB> also offers completion server.domain.org. It should offer nothing, because I have server.domain.org in my /etc/hosts, and not SERVER.DOMAIN.ORG Commented Aug 6, 2020 at 13:55
  • If so then either you don't use the modified _hosts file (I've updated my answer), or you're stuck in 1st point of that answer. To verify the former problem - simply put some bogus code or echo in the _hosts and see if this is the code that is actually being used (you might have some other directory included in $fpath which holds previous _hosts). As for the 1st problem: zstyle | grep -A1 matcher-list Commented Aug 7, 2020 at 10:33
  • I have found out why your solution did not work fore me. Please see my UPDATE 2 for details. Commented Jan 20, 2021 at 9:19
  • I'm glad you've narrowed this down to local config - I've just posted updated response which handles also these hosts. Commented Jan 21, 2021 at 5:45
  • everything works perfectly now. Thank you for your help and patience. Commented Jan 21, 2021 at 6:19