emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pcompletion for ssh and scp


From: Edward O'Connor
Subject: Re: Pcompletion for ssh and scp
Date: Fri, 07 Dec 2007 10:39:40 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin)

Phil Hagelberg wrote:

> I've added support for hostname completion in eshell when using ssh and
> scp. It gathers a list of hostnames from the ~/.ssh/known_hosts file.

Cool.

Could you also complete from 'Host' entries in ~/.ssh/config? I have
lots of shortcut hosts in there like so:

,----[~/.ssh/config]
| Host andromeda
| HostName andromeda.dapyr.net
| 
| Host rakim
| HostName cfhp.org
`----

I'd love to be able to tab-complete from those. I do this in tcsh like
so:

,----[~/.cshrc]
| set ssh_hosts = `grep '^Host[ ][^*]' ~/.ssh/config | cut -c 6-`
| complete ssh 'p/1/$ssh_hosts/'
| 
| foreach host ($ssh_hosts) # $
|     alias $host "ssh -t $host screen -DR"
| end
`----


-- 
Edward O'Connor
address@hidden

Ense petit placidam sub libertate quietem.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]