aboutsummaryrefslogtreecommitdiffstats
path: root/.bash_profile
diff options
context:
space:
mode:
authorMathias Bynens <mathias@qiwi.be>2011-09-16 23:03:27 -0700
committerMathias Bynens <mathias@qiwi.be>2011-09-16 23:03:27 -0700
commit48bac9e2640d99801564adc7d1a44ac7a4934a04 (patch)
tree528d890acf514fe08ce315aaeeefb99cca1602e7 /.bash_profile
parent2866304888dda7a42d6aaa58eed00806e4f9b278 (diff)
parent050165b915dd54141f1e4d81dea8208032e5e6c6 (diff)
downloaddotfiles-48bac9e2640d99801564adc7d1a44ac7a4934a04.tar.gz
dotfiles-48bac9e2640d99801564adc7d1a44ac7a4934a04.tar.bz2
dotfiles-48bac9e2640d99801564adc7d1a44ac7a4934a04.zip
Merge pull request #19 from jhirbour/master
Add tab completion for known ssh hostnames.
Diffstat (limited to '.bash_profile')
-rwxr-xr-x.bash_profile6
1 files changed, 5 insertions, 1 deletions
diff --git a/.bash_profile b/.bash_profile
index 865207e..0b9282e 100755
--- a/.bash_profile
+++ b/.bash_profile
@@ -6,4 +6,8 @@ for file in bash_prompt exports aliases functions extra; do
done
# Case-insensitive globbing (used in pathname expansion)
-shopt -s nocaseglob \ No newline at end of file
+shopt -s nocaseglob
+
+# auto complete ssh host names (the crap between ` and ` just has to be a list... you could just make a list of hosts....
+complete -W "$(echo `grep ^Host ~/.ssh/config |sed -e 's/Host //g'| grep -v "*"`;)" ssh
+