summaryrefslogtreecommitdiffstats
path: root/test/config
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
commitf2621414ee5f2f601424c22f00e207903e3b6104 (patch)
tree56a856dafd1ca684bb23263cacaa723ee4f404fc /test/config
parentAdding debian version 1:2.11-8. (diff)
downloadbash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.tar.xz
bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.zip
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/config')
-rw-r--r--test/config/bashrc40
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: