/usr/portage

Working on bash-completion 0

Between learning for my examination next week, I need some avocation. So I played around with bash-completion to make daily work more comfortable. Here is my first fast hack. It completes the defined SSH-Hosts. Only put this in your /etc/profile or ~/.bashrc and it should work quite fine.
<pre>SSH_HOSTS=$(grep “^Host “ ~/.ssh/config /etc/ssh/ssh_config | sed -e “s/^Host \(.\)/\1/” -e “s/\//g”)
complete -W “${SSH_HOSTS}” ssh sftp</pre>

Filed under & no comments & one trackback

Trackbacks

Trackback specific URI for this entry

No Trackbacks

Comments

No comments

Add a Comment & let me know what you think