diff --git a/completions/Makefile.am b/completions/Makefile.am index 0da13468de5..bf392161f96 100644 --- a/completions/Makefile.am +++ b/completions/Makefile.am @@ -455,6 +455,7 @@ bashcomp_DATA = 2to3 \ useradd \ userdel \ usermod \ + _uvx \ valgrind \ _vault \ vipw \ diff --git a/completions/_uvx b/completions/_uvx new file mode 100644 index 00000000000..f08d3f66baf --- /dev/null +++ b/completions/_uvx @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd --generate-shell-completion bash". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" --generate-shell-completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/test/fallback/completions/Makefile.am b/test/fallback/completions/Makefile.am index 160cdd58d4b..c8057f0f5e0 100644 --- a/test/fallback/completions/Makefile.am +++ b/test/fallback/completions/Makefile.am @@ -47,6 +47,7 @@ EXTRA_DIST = \ udevadm \ umount \ umount.linux \ + uvx \ vault \ write \ xm \ diff --git a/test/fallback/completions/uvx b/test/fallback/completions/uvx new file mode 120000 index 00000000000..ae2e60b1d70 --- /dev/null +++ b/test/fallback/completions/uvx @@ -0,0 +1 @@ +../../../completions/_uvx \ No newline at end of file