Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: compctl - using hostnames with rlogin, rsh, and ssh
- X-seq: zsh-users 1704
- From: Thomas Köhler <jean-luc@xxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: compctl - using hostnames with rlogin, rsh, and ssh
- Date: Wed, 5 Aug 1998 00:47:35 +0200
- In-reply-to: <19980804211110.A22898@xxxxxxxxxxxxxxxxx>; from Sven Guckes on Tue, Aug 04, 1998 at 09:11:10PM +0200
- Mail-followup-to: zsh-users@xxxxxxxxxxxxxxx
- References: <19980730230755.B6503@xxxxxxxxxxxxxxxxx> <Pine.LNX.3.96.980803233328.19072E-100000@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <19980804173325.K9765@xxxxxxxxxxxxxxxxx> <13767.22210.350181.384719@knecht> <19980804211110.A22898@xxxxxxxxxxxxxxxxx>
On Tue, Aug 04, 1998 at 09:11:10PM +0200, Sven Guckes wrote:
> > if [[ -f ~/.zshhosts ]]; then
> > # read in host list from ~/.zshhosts
> > hosts=$(< ~/.zshhosts)
>
> Quoting Roland Jesse (jesse@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx):
> > Does it matter whether the hostnames in ~/.zshhosts are
> > all stored in one big line or in one line per host name?
>
> Well, my ~/.zshhosts has one hostname per line.
> Dunno whether it'll work with all hosts on one line.
> Oh, heck, I'll give it a try:
>
> :%j
> :w
> :shell
> $ ssh <TAB>
> $ ssh erdos\ euler\ gauss\ leibniz\ pascal\
>
> Nope, doesn't seem to work.
Not this way, no. You did a
hosts=$(< ~/.zshhosts)
which doesn't work because all is in a variable. Try an array instead:
hosts=($(< ~/.zshhosts))
This will work whether or not all hosts are in one line or there is one
hostname per line.
~> shosts=($(< sshhosts))
~> compctl -k shosts ssh
~> ssh a<tab>
~> ssh automatix.informatik.uni-wuerzburg.de
~> rhosts=($(< rshhosts))
~> compctl -k rhosts rsh
~> rsh a<tab>
~> rsh automatix.informatik.uni-wuerzburg.de
~> < sshhosts
automatix.informatik.uni-wuerzburg.de
datenbus.mayn.de
picard.franken.de
willkuere.informatik.uni-wuerzburg.de
~> < rshhosts
automatix.informatik.uni-wuerzburg.de datenbus.mayn.de picard.franken.de willkuere.informatik.uni-wuerzburg.de
~>
> Sven ['u', ":w" ;-)]
CU,
Thomas
--
Thomas Köhler Email: jean-luc@xxxxxxxxxxxxxxxxx
<>< WWW: http://home.pages.de/~jeanluc/
IRC: jeanluc
LCARS --- Linux for Computers on All Real Starships
Messages sorted by:
Reverse Date,
Date,
Thread,
Author