From f4acb49ea148cdd899f7f29f1591c7bc853c2135 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:03:18 +0200 Subject: Adding upstream version 1:2.12.0. Signed-off-by: Daniel Baumann --- test/config/bashrc | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) (limited to 'test/config/bashrc') diff --git a/test/config/bashrc b/test/config/bashrc index 141dddc..dcb8aac 100644 --- a/test/config/bashrc +++ b/test/config/bashrc @@ -33,20 +33,26 @@ export BASH_COMPLETION_USER_FILE=/dev/null # ...and avoid stuff in BASH_COMPLETION_USER_DIR and system install locations # overriding in-tree completions. Setting the user dir would otherwise suffice, # 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/.." || exit 1 - pwd -) -# /var/empty isn't necessarily actually always empty :P -export BASH_COMPLETION_COMPAT_DIR=/var/empty/bash_completion.d +# found in *any* completion dirs, and we want to use our "shadow" completion +# dir with which we cause loading of our in-tree fallback completions +# instead of possibly (system-)installed upstream ones. +export BASH_COMPLETION_USER_DIR="$SRCDIRABS/fallback" +export BASH_COMPLETION_COMPAT_DIR="$SRCDIRABS/../bash_completion.d" export XDG_DATA_DIRS=/var/empty # Make sure default settings are in effect unset -v \ + BASH_COMPLETION_CMD_CONFIGURE_HINTS \ + BASH_COMPLETION_CMD_CVS_REMOTE \ + BASH_COMPLETION_CMD_IWCONFIG_SCAN \ + BASH_COMPLETION_CMD_TAR_INTERNAL_PATHS \ + BASH_COMPLETION_COMPAT_IGNORE \ + BASH_COMPLETION_FILEDIR_FALLBACK \ + BASH_COMPLETION_KNOWN_HOSTS_WITH_HOSTFILE \ COMP_CONFIGURE_HINTS \ COMP_CVS_REMOTE \ + COMP_FILEDIR_FALLBACK \ + COMP_IWLIST_SCAN \ COMP_KNOWN_HOSTS_WITH_HOSTFILE \ COMP_TAR_INTERNAL_PATHS @@ -56,6 +62,24 @@ add_comp_wordbreak_char() [[ "${COMP_WORDBREAKS//[^$1]/}" ]] || COMP_WORDBREAKS+=$1 } +_comp__test_get_env() +{ + ( + # Do not output the state of test variables "_comp__test_+([0-9])_*" + # and internal mutable variables "_comp_*_mut_*". + local IFS=$' \t\n' + # shellcheck disable=SC2046 + unset -v $(compgen -W '"${!_comp_@}"' -X '!_comp_@(_test_+([0-9])_*|*_mut_*)') + _comp_unlocal IFS + + set -o posix + set + ) + declare -F + shopt -p + set -o +} + # Local variables: # mode: shell-script # End: -- cgit v1.2.3