From 891e547055c48523ab89e2297eb23636c1aed931 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 28 Jan 2017 20:51:23 +1300 Subject: Start using Bash host completion But use ~/.hosts if it's there --- bash/bashrc.d/completion.bash | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bash/bashrc.d') 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: (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 -- cgit v1.2.3