From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15317 invoked by alias); 5 Nov 2016 04:42:14 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22084 Received: (qmail 26141 invoked from network); 5 Nov 2016 04:42:13 -0000 X-Qmail-Scanner-Diagnostics: from mail-ua0-f173.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.217.173):SA:0(0.0/5.0):. Processed in 0.139758 secs); 05 Nov 2016 04:42:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.217.173 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject:cc :mime-version; bh=imfNVY868mrlt0gxzJ98/gKnfaRSiGhXLwFkVaJDhOE=; b=yZNvGCRsfqFr4+2ogoFo99hi/Gp6QLPOVug7OHn2z3wLWz0p4ANv7f5qcVvNlcPqLD Dyr5Y7vzMzSi6jd31cJH0g2M37H/qgQ1/D2wf3PDOnqWksSzN8bBNeXLja+73drbf/J+ Go749VwhmLkwakxViAoWppyM2DrBIXDQ9evGP4jvBTe8ci2AkDao+IgsPu24Y1NpyloO 6SublCruyDmXqFK8FZB00qqI25UglF/03sy4eKNWg+KNzE0issFiSgDOMdEIlrf1ry0J sTPAyhuE/htBbtKimg++/CvR+rBmtF/2RddxW7pVaY+bu/T87GgQa7rlX6LTEslhlM5E shng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:cc:mime-version; bh=imfNVY868mrlt0gxzJ98/gKnfaRSiGhXLwFkVaJDhOE=; b=GzF7LEuaH2B9sVWRV16T2sdGt2VRp706LrkfDNWDl1Fdz8eOjfclYF/rkbD7+qwfOJ qdbTRHGeeyHX9S7FrhgDg4EvEYXW3ElLm9ekCGwoleCCOq3fikXA252E9AkYMhE+4YGi joHiCARS6/ONq2TlM6bGrb9K42UJlNwYZ6cWHedoa190RDiqZQTFska4C7K1K0HV7aOa ZueXZryEpSKdSotBzgjPNS0B5yJRP9dC+FcFX+9Nw8X+cfv3qV1Q0UYiRepgzt3y6ptr EZbyaUwjaY+1VnuKh9vRZLLsU+lG+6getrKswKZ8y8TuOl6q67OGWcZ2Wbu6mS0dXr+E R1Tw== X-Gm-Message-State: ABUngvdYBPKdYKSEq4zy9yhT8eaHkpJSTOcxNF9dkLhmrhKaPd6qNoJ0FELONVZr3pCNoQ== X-Received: by 10.176.7.8 with SMTP id h8mr11997750uah.114.1478320927038; Fri, 04 Nov 2016 21:42:07 -0700 (PDT) From: Bart Schaefer Message-Id: <161104214237.ZM18518@torch.brasslantern.com> Date: Fri, 4 Nov 2016 21:42:37 -0700 In-Reply-To: <581B8BCE.2040108@gmx.ch> Comments: In reply to Fourhundred Thecat <400thecat@gmx.ch> "hostname completion for ssh / scp" (Nov 3, 8:11pm) References: <581B8BCE.2040108@gmx.ch> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: hostname completion for ssh / scp Cc: Fourhundred Thecat <400thecat@gmx.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Nov 3, 8:11pm, Fourhundred Thecat wrote: } Subject: hostname completion for ssh / scp } } ssh } } it offers me only the hostnames listed in ~/.ssh/config and completely } ignores global ones defined in /etc/hosts } } Tested on zsh 4.3.17 What does getent hosts return on your system? That's where _hosts gets the list of hosts. Only if getent isn't present does it look directly at /etc/hosts, and also at "ypcat hosts" if there is ypcat. If getent isn't returning anything useful, you can replace it: zstyle ':completion:*:hosts' command 'cat /etc/hosts' Or explicitly list all the hosts yourself: zstyle ':completion:*:hosts' hosts $(awk '/^[^#]/ {print $2}' /etc/hosts) Note there have been several other fixes/improvements to ssh host-gathering since zsh 5.0.