diff options
Diffstat (limited to 'test/config/bashrc')
-rw-r--r-- | test/config/bashrc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/test/config/bashrc b/test/config/bashrc index dad96335..141dddc5 100644 --- a/test/config/bashrc +++ b/test/config/bashrc @@ -1,7 +1,7 @@ # bashrc file for bash-completion test suite # Note that we do some initialization that would be too late to do here in -# library.exp's start_bash() and conftest.py. +# conftest.py. # Use emacs key bindings set -o emacs @@ -9,6 +9,9 @@ set -o emacs # Use bash strict mode set -o posix +# Raise error on uninitialized variables +set -o nounset + # Unset `command_not_found_handle' as defined on Debian/Ubuntu, because this # troubles and slows down testing unset -f command_not_found_handle @@ -32,7 +35,10 @@ export BASH_COMPLETION_USER_FILE=/dev/null # but simple xspec completions are only installed if a separate one is not # found in any completion dirs. Therefore we also point the "system" dirs to # locations that should not yield valid completions and helpers paths either. -export BASH_COMPLETION_USER_DIR=$(cd "$SRCDIR/.."; pwd) +export BASH_COMPLETION_USER_DIR=$( + cd "$SRCDIR/.." || exit 1 + pwd +) # /var/empty isn't necessarily actually always empty :P export BASH_COMPLETION_COMPAT_DIR=/var/empty/bash_completion.d export XDG_DATA_DIRS=/var/empty @@ -44,8 +50,11 @@ unset -v \ COMP_KNOWN_HOSTS_WITH_HOSTFILE \ COMP_TAR_INTERNAL_PATHS -# Load bash testsuite helper functions -. $SRCDIR/lib/library.sh +# @param $1 Char to add to $COMP_WORDBREAKS +add_comp_wordbreak_char() +{ + [[ "${COMP_WORDBREAKS//[^$1]/}" ]] || COMP_WORDBREAKS+=$1 +} # Local variables: # mode: shell-script |