On Thu, 22 Jul 2004 13:25:29 +0100
bobb <bobb at redbrick.dcu.ie> wrote:
> I found something cool (and a little scary) recently with the
> default completion script for bash, if you have ssh keys and
> agent and stuff setup between machines you can do something
> like ``scp machine:/foo/bar<TAB>'' and it will automatically
> log in, get a directory listing, and complete to ``scp
> machine:/foo/bar.txt'' or whatever....
Are you sure?
For the purposes of auto-completion, bash treats an un-escaped
(in-escaped? imprisoned? caped???) full-colon as a terminator
for an argument so anything following it is treated as a new
argument. If you have a file called "foo:bar" and type
"vim foo:<TAB>", bash will present your current directory listing
instead of completing to "foo:bar"; you would need to type
"foo\:<TAB>" instead, or simply "foo<TAB>".
"gobbledigook:/e" will complete to "gobbledigook:/etc".
What bash does do with relation to ssh is that it'll read your
known_hosts file and use the hostnames as candidates. If
you have dagda.tuatha.org in your known_hosts, and type
"dag<TAB>", bash will fill it in for you. Which is nice.
AFAIK, it does not behave as you described - what you're seeing
is your local filesystem. I may be completely wrong, if so,
please enlighten me.
PGP Key: 0x1554900B (expires 09-Jun-2005)
Web: http://www.helgrim.com/ | ICQ: 109837009 | YIM: ectoraige
Visit http://ie.bsd.net - BSDs presence in Ireland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://mail.linux.ie/pipermail/ilug/attachments/20040723/6e675de3/attachment.pgp
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!