diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
commit | f4acb49ea148cdd899f7f29f1591c7bc853c2135 (patch) | |
tree | b62d60873864065d6428a84a119dd8a3c90f1397 /test/config/bashrc | |
parent | Adding upstream version 1:2.11. (diff) | |
download | bash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.tar.xz bash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.zip |
Adding upstream version 1:2.12.0.upstream/1%2.12.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/config/bashrc')
-rw-r--r-- | test/config/bashrc | 40 |
1 files changed, 32 insertions, 8 deletions
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: |