aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-01-28 20:51:23 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-01-28 20:51:23 +1300
commit891e547055c48523ab89e2297eb23636c1aed931 (patch)
tree127f9efc3050a6eb651514c3aabd477aa26f5f3d /bash/bashrc.d
parentCorrect a typeset call (diff)
downloaddotfiles-891e547055c48523ab89e2297eb23636c1aed931.tar.gz
dotfiles-891e547055c48523ab89e2297eb23636c1aed931.zip
Start using Bash host completion
But use ~/.hosts if it's there
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r--bash/bashrc.d/completion.bash4
1 files changed, 4 insertions, 0 deletions
diff --git a/bash/bashrc.d/completion.bash b/bash/bashrc.d/completion.bash
index 0d8dbb13..c77f8844 100644
--- a/bash/bashrc.d/completion.bash
+++ b/bash/bashrc.d/completion.bash
@@ -6,6 +6,10 @@
# character: <http://tiswww.case.edu/php/chet/bash/FAQ> (E13)
[[ -n $COMP_WORDBREAKS ]] && COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
+# If ~/.hosts exists, use that as the host completion file rather than
+# /etc/hosts, so I can populate the list myself
+[[ -f $HOME/.hosts ]] && HOSTFILE=$HOME/.hosts
+
# Aliases
complete -A alias unalias