From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3198 invoked by alias); 5 Nov 2016 20:31:45 -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: 22088 Received: (qmail 14893 invoked from network); 5 Nov 2016 20:31:45 -0000 X-Qmail-Scanner-Diagnostics: from out2-smtp.messagingengine.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(66.111.4.26):SA:0(0.0/5.0):. Processed in 0.611095 secs); 05 Nov 2016 20:31:45 -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=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=KXvdA+zS469hqJD ww4bxbz4hTqM=; b=N8rhraFST7KVXzRR6LemAWhcYHPgFKRtzS/bgHsKWZWFSY7 Y9M+8qr0HOqI2siH5WyPRHizYh8bUtPkxt3h0H/vXehmabsmF4JQm9bf6lel2f57 22ofGiumppyfJ6cVrZkFeXhNcPIuyjCDRYRuMK9BRSa6rkWz4BdGwjgkMZHQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=KXvdA+zS469hqJ Dww4bxbz4hTqM=; b=udhm3D543rbKuOeQ+TW0nF1m5PvnozybG/6rEY0Hi0DeUA 11CU8Bq1daWckA6lpjtDH9OHHSqT+Gp2/fcBIzGDeMjEL0XDjqxf9ZzeKIri+x+o bwWrae0M90LRlfg6GvreZN6/PEjd5iDJ+d6MS5usZrqRCnchoXhYP9QUy44UM= X-ME-Sender: X-Sasl-enc: bipymAusk9WDY7Al24w5aSkygpp2f1r8R2LwH1GHT6JS 1478377895 Date: Sat, 5 Nov 2016 20:31:31 +0000 From: Daniel Shahaf To: Fourhundred Thecat <400thecat@gmx.ch> Cc: zsh-users@zsh.org Subject: Re: hostname completion for ssh / scp Message-ID: <20161105203131.GA11681@fujitsu.shahaf.local2> References: <581B8BCE.2040108@gmx.ch> <161104214237.ZM18518@torch.brasslantern.com> <581D9E98.1000008@gmx.ch> <161105102455.ZM20692@torch.brasslantern.com> <581E2AE5.4040006__46101.1380576112$1478372966$gmane$org@gmx.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <581E2AE5.4040006__46101.1380576112$1478372966$gmane$org@gmx.ch> User-Agent: Mutt/1.5.23 (2014-03-12) Fourhundred Thecat wrote on Sat, Nov 05, 2016 at 19:54:29 +0100: > > On 2016-11-05 18:24, Bart Schaefer wrote: > > Well, yes. The syntax of the /etc/hosts file is first an IP and then > > a hostname. Somebody will possibly correct me, but I don't recall > > any valid use of /etc/hosts that has lines of host names without IPs. > > Not true. IP address is not mandatory in /etc/hosts. You can leave it > out, and only have hostnames. The IP address is mandatory on both Linux and FreeBSD, according to their respective hosts(5) man pages. Does hosts(5) on your system make the IP address optional? Or are you simply saying that you put in /etc/hosts a line with no IP address, and bash's hostname completion used hostnames from that line? > This is useful for host autocompletion. > You don't have to type a long hostname, such as: > > ssh long-or-complicated-host.my-subdomain.my-domain.com > > instead, you just type > > ssh long