Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: hostname completion for ssh / scp
- X-seq: zsh-users 22088
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Fourhundred Thecat <400thecat@xxxxxx>
- Subject: Re: hostname completion for ssh / scp
- Date: Sat, 5 Nov 2016 20:31:31 +0000
- Cc: zsh-users@xxxxxxx
- 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=
- In-reply-to: <581E2AE5.4040006__46101.1380576112$1478372966$gmane$org@gmx.ch>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- 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>
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<TAB>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author