File tree 6 files changed +24
-0
lines changed
6 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -404,6 +404,7 @@ cross_platform = 2to3 \
404
404
sh \
405
405
sha256sum \
406
406
shellcheck \
407
+ _shtab \
407
408
sitecopy \
408
409
slabtop \
409
410
_slackpkg \
Original file line number Diff line number Diff line change
1
+ # 3rd party completion loader for commands emitting -*- shell-script -*-
2
+ # their completion using "$cmd --print-own-completion bash".
3
+ # For example, https://github.com/iterative/shtab does.
4
+ #
5
+ # This serves as a fallback in case the completion is not installed otherwise.
6
+
7
+ eval -- " $( " $1 " --print-own-completion bash 2> /dev/null) "
8
+
9
+ # ex: filetype=sh
Original file line number Diff line number Diff line change
1
+ ../../../completions/_shtab
Original file line number Diff line number Diff line change @@ -568,6 +568,7 @@ EXTRA_DIST = \
568
568
test_sha512sum.py \
569
569
test_shar.py \
570
570
test_shellcheck.py \
571
+ test_shtab.py \
571
572
test_sitecopy.py \
572
573
test_slabtop.py \
573
574
test_slackpkg.py \
Original file line number Diff line number Diff line change
1
+ import pytest
2
+
3
+
4
+ class TestShtab :
5
+ @pytest .mark .complete ("shtab " , require_cmd = True )
6
+ def test_basic (self , completion ):
7
+ assert not completion
8
+
9
+ @pytest .mark .complete ("shtab -" , require_cmd = True )
10
+ def test_options (self , completion ):
11
+ assert completion
Original file line number Diff line number Diff line change @@ -346,6 +346,7 @@ sha384sum
346
346
sha512sum
347
347
shar
348
348
shellcheck
349
+ shtab
349
350
sitecopy
350
351
slabtop
351
352
slapt-get
You can’t perform that action at this time.
0 commit comments