Skip to content

Commit

Permalink
feat(jj): add 3rd party fallback completion loader
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Dec 19, 2024
1 parent 4dc827a commit d70381e
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 @@ -204,6 +204,7 @@ cross_platform = 2to3 \
jarsigner \
java \
javaws \
_jj \
jq \
jpegoptim \
jps \
Expand Down
8 changes: 8 additions & 0 deletions completions/_jj
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 util completion bash".
#
# This serves as a fallback in case the completion is not installed otherwise.

eval -- "$("$1" util 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 @@ -16,6 +16,7 @@ EXTRA_DIST = \
hwclock \
insmod \
ionice \
jj \
jungle \
keyring \
kontena \
Expand Down
1 change: 1 addition & 0 deletions test/fallback/completions/jj

0 comments on commit d70381e

Please sign in to comment.