From: Sven Guckes <guckes@math.fu-berlin.de>
To: zsh-users@math.gatech.edu
Subject: Re: compctl - using hostnames with rlogin, rsh, and ssh
Date: Tue, 4 Aug 1998 17:33:25 +0200 [thread overview]
Message-ID: <19980804173325.K9765@math.fu-berlin.de> (raw)
In-Reply-To: <Pine.LNX.3.96.980803233328.19072E-100000@reflections.eng.mindspring.net>; from Todd Graham Lewis on Mon, Aug 03, 1998 at 11:38:55PM -0400
Quoting Todd Graham Lewis (tlewis@mindspring.net):
> compctl -k hostlist ssh
>
> function hosts(){
> unset hostlist
> echo "Enter password on hunterd for host completion. "
> set -A hostlist `echo "select hostname,status from hosttable;"\
> | ssh dbserver "psql hostdb 2>/dev/null"\
> | grep Active\
> | sed 's/|/ /g'\
> | awk '{print $1}'`
> # echo "hosts are $hostlist"
> }
Looks like this could take quite a while to process.
I would rather use a given deafult list of hosts.
Here is the solution with the zsh setup at our site:
hosts="" # make hosts an empty list
if [[ -f ~/.zshhosts ]]; then
# read in host list from ~/.zshhosts
hosts=$(< ~/.zshhosts)
set -A hosts ${(f)hosts}
else
# set the default host list
hosts=(erdos euler gauss leibniz pascal)
compctl -k hosts -x 'p[2,-1]' -l '' -- rsh ssh
compctl -k hosts -x 'c[-1,-l]' -u -- rlogin
Comments?
Sven
--
Sven Guckes guckes@math.fu-berlin.de using zsh-3.0.5 [961218]
ZSH HomePage: http://www.zsh.org | Latest version: zsh-3.1.4 [980601]
ZSH Pages: http://www.math.fu-berlin.de/~guckes/zsh/ Tips and tricks
next prev parent reply other threads:[~1998-08-04 15:59 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 ` Sven Guckes [this message]
1998-08-04 18:45 ` compctl - using hostnames with rlogin, rsh, and ssh Roland Jesse
1998-08-04 19:11 ` Sven Guckes
1998-08-04 22:47 ` Thomas Köhler
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=19980804173325.K9765@math.fu-berlin.de \
--to=guckes@math.fu-berlin.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).