Skip to content

Commit 499ecab

Browse files
committed
feat(uvx): add 3rd party fallback completion loader
https://docs.astral.sh/uv/getting-started/installation/#shell-autocompletion
1 parent ba003af commit 499ecab

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

Diff for: completions/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ bashcomp_DATA = 2to3 \
455455
useradd \
456456
userdel \
457457
usermod \
458+
_uvx \
458459
valgrind \
459460
_vault \
460461
vipw \

Diff for: completions/_uvx

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# 3rd party completion loader for commands emitting -*- shell-script -*-
2+
# their completion using "$cmd --generate-shell-completion bash".
3+
#
4+
# This serves as a fallback in case the completion is not installed otherwise.
5+
6+
eval -- "$("$1" --generate-shell-completion bash 2>/dev/null)"
7+
8+
# ex: filetype=sh

Diff for: test/fallback/completions/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ EXTRA_DIST = \
4747
udevadm \
4848
umount \
4949
umount.linux \
50+
uvx \
5051
vault \
5152
write \
5253
xm \

Diff for: test/fallback/completions/uvx

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../completions/_uvx

0 commit comments

Comments
 (0)