Skip to content

Commit 72a8c48

Browse files
authored
Merge pull request #957 from scop/feat/clap-3rdparty
feat: add some clap_complete based 3rd party loaders
2 parents 77c9fd6 + 7b8344d commit 72a8c48

File tree

9 files changed

+45
-0
lines changed

9 files changed

+45
-0
lines changed

completions/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@
4747
/createuser
4848
/_datree
4949
/dcop
50+
/_deno
5051
/dfutool
52+
/_diesel
5153
/display
5254
/_docker
5355
/dpkg-deb
@@ -274,6 +276,7 @@
274276
/spovray
275277
/_sshi
276278
/star
279+
/_starship
277280
/stream
278281
/sudoedit
279282
/_tanzu
@@ -306,6 +309,7 @@
306309
/vgsplit
307310
/vigr
308311
/_virtctl
312+
/_watchexec
309313
/whatis
310314
/wine-development
311315
/wine-stable

completions/Makefile.am

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ bashcomp_DATA = 2to3 \
118118
fio \
119119
firefox \
120120
flake8 \
121+
_flamegraph \
121122
freebsd-update \
122123
freeciv \
123124
freeciv-server \
@@ -253,6 +254,7 @@ bashcomp_DATA = 2to3 \
253254
mc \
254255
mcrypt \
255256
mdadm \
257+
_mdbook \
256258
mdtool \
257259
medusa \
258260
mii-diag \
@@ -426,6 +428,7 @@ bashcomp_DATA = 2to3 \
426428
tcpnice \
427429
timeout \
428430
tipc \
431+
_tokio-console \
429432
tox \
430433
tracepath \
431434
tree \
@@ -554,7 +557,9 @@ CLEANFILES = \
554557
createuser \
555558
_datree \
556559
dcop \
560+
_deno \
557561
dfutool \
562+
_diesel \
558563
display \
559564
_docker \
560565
dpkg-deb \
@@ -827,6 +832,7 @@ CLEANFILES = \
827832
spovray \
828833
_sshi \
829834
star \
835+
_starship \
830836
stream \
831837
sudoedit \
832838
_tanzu \
@@ -859,6 +865,7 @@ CLEANFILES = \
859865
vgsplit \
860866
vigr \
861867
_virtctl \
868+
_watchexec \
862869
whatis \
863870
wine-development \
864871
wine-stable \
@@ -925,6 +932,8 @@ symlinks: $(DATA)
925932
mailsnarf msgsnarf
926933
$(ss) firefox \
927934
firefox-esr iceweasel mozilla-firefox
935+
$(ss) _flamegraph \
936+
_watchexec
928937
$(ss) freeciv \
929938
civclient freeciv-gtk2 freeciv-gtk3 freeciv-sdl freeciv-xaw
930939
$(ss) freeciv-server \
@@ -1052,6 +1061,8 @@ symlinks: $(DATA)
10521061
apropos whatis
10531062
$(ss) mcrypt \
10541063
mdecrypt
1064+
$(ss) _mdbook \
1065+
_deno _diesel _starship
10551066
$(ss) mplayer \
10561067
gmplayer kplayer mencoder mplayer2
10571068
$(ss) mutt \

completions/_flamegraph

Lines changed: 8 additions & 0 deletions
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 --completions bash".
3+
#
4+
# This serves as a fallback in case the completion is not installed otherwise.
5+
6+
eval -- "$("$1" --completions bash 2>/dev/null)"
7+
8+
# ex: filetype=sh

completions/_mdbook

Lines changed: 8 additions & 0 deletions
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 completions bash".
3+
#
4+
# This serves as a fallback in case the completion is not installed otherwise.
5+
6+
eval -- "$("$1" completions bash 2>/dev/null)"
7+
8+
# ex: filetype=sh

completions/_tokio-console

Lines changed: 8 additions & 0 deletions
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 gen-completion bash".
3+
#
4+
# This serves as a fallback in case the completion is not installed otherwise.
5+
6+
eval -- "$("$1" gen-completion bash 2>/dev/null)"
7+
8+
# ex: filetype=sh

test/fallback/completions/Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ EXTRA_DIST = \
66
chsh \
77
dmesg \
88
eject \
9+
flamegraph \
910
gaiacli \
1011
gh \
1112
golangci-lint \
@@ -14,6 +15,7 @@ EXTRA_DIST = \
1415
hwclock \
1516
ionice \
1617
look \
18+
mdbook \
1719
mock \
1820
modules \
1921
mount \
@@ -34,6 +36,7 @@ EXTRA_DIST = \
3436
svn \
3537
svnadmin \
3638
svnlook \
39+
tokio-console \
3740
udevadm \
3841
umount \
3942
umount.linux \

test/fallback/completions/flamegraph

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../completions/_flamegraph

test/fallback/completions/mdbook

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../completions/_mdbook
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../completions/_tokio-console

0 commit comments

Comments
 (0)