Skip to content

Commit

Permalink
feat(uvx): add 3rd party fallback completion loader
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Oct 14, 2024
1 parent ba003af commit 499ecab
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions completions/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ bashcomp_DATA = 2to3 \
useradd \
userdel \
usermod \
_uvx \
valgrind \
_vault \
vipw \
Expand Down
8 changes: 8 additions & 0 deletions completions/_uvx
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions test/fallback/completions/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ EXTRA_DIST = \
udevadm \
umount \
umount.linux \
uvx \
vault \
write \
xm \
Expand Down
1 change: 1 addition & 0 deletions test/fallback/completions/uvx

0 comments on commit 499ecab

Please sign in to comment.