all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Edward O'Connor <hober0@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Pcompletion for ssh and scp
Date: Fri, 07 Dec 2007 10:39:40 -0800	[thread overview]
Message-ID: <m2r6hybb83.fsf@gmail.com> (raw)
In-Reply-To: 85d4tmm6pc.fsf@evri.com

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
hober0@gmail.com

Ense petit placidam sub libertate quietem.

  parent reply	other threads:[~2007-12-07 18:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-04 22:32 Pcompletion for ssh and scp Phil Hagelberg
2007-12-05  2:10 ` Stefan Monnier
2007-12-05  6:27   ` Manoj Srivastava
2007-12-05 14:32     ` Stefan Monnier
2007-12-05 20:16   ` Phil Hagelberg
2007-12-06  0:07     ` Glenn Morris
2007-12-06  1:22       ` Phil Hagelberg
2007-12-06  2:22         ` Glenn Morris
2007-12-06 17:46           ` Phil Hagelberg
2008-02-08  5:17             ` Glenn Morris
2007-12-07 18:39 ` Edward O'Connor [this message]
2007-12-07 19:09   ` Phil Hagelberg

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=m2r6hybb83.fsf@gmail.com \
    --to=hober0@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.