summaryrefslogtreecommitdiffstats
path: root/test/config/bashrc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:19 +0000
commit6c09f2a45c5541e9c207d14fc7aa21a4a0066bde (patch)
tree0221189d367bf661f6f9493c4f17a03f0dd4b7d2 /test/config/bashrc
parentReleasing progress-linux version 1:2.11-8~progress7.99u1. (diff)
downloadbash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.tar.xz
bash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.zip
Merging upstream version 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/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: