Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completing from different ssh config file
- X-seq: zsh-users 10976
- From: Chris Johnson <cjohnson@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Completing from different ssh config file
- Date: Mon, 13 Nov 2006 14:57:12 -0500
- In-reply-to: <20061113172327.GC22561@princo>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20061113172327.GC22561@princo>
Jean-Rene David sent me the following 0.4K:
> I use the following function to log in to certain hosts:
>
> foo() {
> ssh -i ~/.ssh/id_rsa.foo \
> -F ~/.ssh/config.foo \
> "$*"
> }
>
> How would I configure the completion system so
> that the hostname is completed from
> ~/.ssh/config.foo when I use this function?
>
> Right now the hostname isn't completed at all
> because the context isn't recognized as a call to
> ssh.
For this last point, try:
compdef foo=ssh
This causes zsh to employ ssh completion for foo. This doesn't really
solve your problem, but I thought I'd share. (Unless the completion for
ssh recognizes the -F option, in which case an alias may be more
appropriate? I dunno.)
--
Chris Johnson
cjohnson@xxxxxxxxxx
http://www.cs.utk.edu/~cjohnson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author