zsh-users
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: "Thomas Köhler" <jean-luc@picard.franken.de>
Cc: zsh-users@sunsite.auc.dk
Subject: Re: ssh completion
Date: Mon, 28 Aug 2000 14:25:49 +0000	[thread overview]
Message-ID: <1000828142549.ZM15410@candle.brasslantern.com> (raw)
In-Reply-To: <gmv7l91x0wj.fsf@kempelen.iit.bme.hu>

On Aug 28, 10:09am, Nemeth Ervin wrote:
} Subject: Re: ssh completion
}
} Here is a bit better one:
} 
} zstyle '*ssh*' hosts $(sed -e '/^#/d
} s/ .*$//
} s/,/ /g' /etc/ssh_known_hosts ~/.ssh/known_hosts)

That one gives me

sed: can't read /etc/ssh_known_hosts: No such file or directory

so it might be a good idea to redirect stderr.

Also, ~/.ssh/known_hosts is sometimes rewritten by ssh, so if the following
isn't too slow, you might try it -- it re-reads the files whenever the style
is tested:

zstyle -e ':completion:*:ssh:*' hosts \
	'reply=($(sed -e "/^#/d" -e "s/ .*\$//" -e "s/,/ /g" \
		/etc/ssh_known_hosts ~/.ssh/known_hosts 2>/dev/null))'

Finally, note that the above works for ssh version 1 and openssh, but not
for ssh2.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


      reply	other threads:[~2000-08-28 14:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-26 19:58 Claus Alboege
2000-08-26 21:37 ` Thomas Köhler
2000-08-28  8:09   ` Nemeth Ervin
2000-08-28 14:25     ` Bart Schaefer [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=1000828142549.ZM15410@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=jean-luc@picard.franken.de \
    --cc=zsh-users@sunsite.auc.dk \
    /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).