zsh-users
 help / color / mirror / code / Atom feed
From: "Thomas Köhler" <jean-luc@picard.franken.de>
To: zsh-users@math.gatech.edu
Subject: Re: compctl - using hostnames with rlogin, rsh, and ssh
Date: Wed, 5 Aug 1998 00:47:35 +0200	[thread overview]
Message-ID: <19980805004735.48027@picard.franken.de> (raw)
In-Reply-To: <19980804211110.A22898@math.fu-berlin.de>; from Sven Guckes on Tue, Aug 04, 1998 at 09:11:10PM +0200

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@prinz-atm.cs.Uni-Magdeburg.DE):
> > 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@picard.franken.de
        <><           WWW:    http://home.pages.de/~jeanluc/
                      IRC:               jeanluc
      LCARS --- Linux for Computers on All Real Starships


      reply	other threads:[~1998-08-04 23:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-30 21:07 compctl - aliasing hostnames Sven Guckes
1998-07-30 22:36 ` Bart Schaefer
1998-07-31  1:45 ` Geoff Wing
1998-07-31 15:02   ` compctl - aliasing hostnames -> ~/.ssh/config Sven Guckes
1998-07-31 15:25     ` Roland Jesse
1998-08-04  3:38 ` compctl - aliasing hostnames Todd Graham Lewis
1998-08-04 15:33   ` compctl - using hostnames with rlogin, rsh, and ssh Sven Guckes
1998-08-04 18:45     ` Roland Jesse
1998-08-04 19:11       ` Sven Guckes
1998-08-04 22:47         ` Thomas Köhler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19980805004735.48027@picard.franken.de \
    --to=jean-luc@picard.franken.de \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).