File tree Expand file tree Collapse file tree 6 files changed +24
-0
lines changed Expand file tree Collapse file tree 6 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -404,6 +404,7 @@ cross_platform = 2to3 \
404404 sh \
405405 sha256sum \
406406 shellcheck \
407+ _shtab \
407408 sitecopy \
408409 slabtop \
409410 _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 = \
568568 test_sha512sum.py \
569569 test_shar.py \
570570 test_shellcheck.py \
571+ test_shtab.py \
571572 test_sitecopy.py \
572573 test_slabtop.py \
573574 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
346346sha512sum
347347shar
348348shellcheck
349+ shtab
349350sitecopy
350351slabtop
351352slapt-get
You can’t perform that action at this time.
0 commit comments