From ddad8ff07de24fb0a42b9ac8627f47c415d3f584 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Mon, 10 Jul 2017 08:59:34 +0100 Subject: [PATCH] attempt ssh comletion --- bash_profile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bash_profile b/bash_profile index b48ffd7e..ddc85434 100644 --- a/bash_profile +++ b/bash_profile @@ -19,5 +19,9 @@ GEM_PATH=$GEM_HOME export PATH=$PATH:$GEM_HOME/bin export GEM_HOME=$(ruby -e 'print Gem.user_dir') + +# tab completion for ssh hosts +complete -o default -o nospace -W "$(/usr/bin/env ruby -ne 'puts $_.split(/[,\s]+/)[1..-1].reject{|host| host.match(/\*|\?/)} if $_.match(/^\s*Host\s+/);' < $HOME/.ssh/config)" scp sftp ssh + #echo -e "Please don't sabotage my computer while I'm away \n\nTo turn on the print server, run the command 'cups'\n\nTo update 3d party plugins, run command 'u3p'" | /usr/bin/cowsay -f tux -W 80