It is currently Tue, 07 Dec 2021 01:47:04 GMT



 
Author Message
 tcsh: completing ssh commands
I'm experimenting with different ways to complete ssh commands. Until
recently, I used:

    complete ssh        'n/-l/u/' \
                        'N/-l/$machines/' \
                        'p/1/$machines/'

For the "ssh -l <user> <machine>" which would complete on both the user
and the machine. I could also simply type "ssh <machine>" and complete
on that.

But stuff like sftp and scp use user@machine syntax instead. Since ssh
can do that too, I thought I'd try to add that in. I came up with this:

    complete ssh        'c/*@/$machines/' \
                        'n/*/u/@'

That's nifty because I can type "ssh", then complete on the username
*and* add the "@" after it, and then complete on the machine name after
that.

But I haven't been able to make it work with either "ssh -l" or "ssh
<machine>", like I had before. Adding in rules to do that is either
ineffective, or it kills the user@machine completion.

So, can I have my cake and eat it too? Is there a way to at least
support "ssh user@machine" *and* "ssh machine"?

Thanks very much,
Aaron Hall

--
Aaron Hall             :  Mac OS X: Because making Unix user-friendly was
ah...@vitaphone.net    :  easier than debugging Windows. (Go Apple!)

Macintosh/UNIX Geek, Network Flack, and...eh, whatever.



 Tue, 31 Aug 2004 01:43:04 GMT   
 
   [ 1 post ] 

Similar Threads

1. Tcsh builtin command "complete"

2. tcsh - complete command

3. "complete" command in tcsh

4. tcsh & complete

5. tcsh: complete with backreference

6. complete function in tcsh

7. case insensitive file complete with tcsh

8. nice tcsh complete for 'make'

9. complete tcsh

10. How to use complete in tcsh?


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software