Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'I fixed the username!' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
I fixed the username!
Authored by: serversurfer on Nov 29, '01 05:51:34PM
A little playing around with Cadre's complete yielded:
complete {scp,rcp} 'C@[./]*@f@' 'c/*@/`list_all_hostnames`/:' 'n/*/`list_all_hostnames`/:'

This will still allow you to tab-complete hostnames after specifying a username.
scp root@ot[TAB]

scp root@otherhost:

I wanted this because sometimes I do work on other boxen as root, but I agree with Cadre's assertion that you should specify your normal username for the other box in ~/.ssh/config.

[ Reply to This | # ]