Skip to content

Commit cd985df

Browse files
committed
feat(b2sum): new completion
1 parent 47aa0a2 commit cd985df

File tree

5 files changed

+16
-2
lines changed

5 files changed

+16
-2
lines changed

completions/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ symlinks: $(DATA)
11261126
$(ss) sbcl \
11271127
sbcl-mt
11281128
$(ss) sha256sum \
1129-
md5sum shasum sha1sum sha224sum sha384sum sha512sum
1129+
b2sum md5sum shasum sha1sum sha224sum sha384sum sha512sum
11301130
$(ss) ssh \
11311131
autossh scp sftp sidedoor slogin
11321132
$(ss) sudo \

completions/sha256sum

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ _comp_cmd_sha256sum()
3333
((${#COMPREPLY[@]})) &&
3434
_comp_compgen -- -X "*.$sumtype" -W '"${COMPREPLY[@]}"'
3535
} &&
36-
complete -F _comp_cmd_sha256sum md5sum sha{,1,224,256,384,512}sum
36+
complete -F _comp_cmd_sha256sum b2sum md5sum sha{,1,224,256,384,512}sum
3737

3838
# ex: filetype=sh

test/t/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ EXTRA_DIST = \
4040
test_avahi_browse.py \
4141
test_avctrl.py \
4242
test_awk.py \
43+
test_b2sum.py \
4344
test_badblocks.py \
4445
test_base64.py \
4546
test_bash.py \

test/t/test_b2sum.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import pytest
2+
3+
4+
class TestB2sum:
5+
@pytest.mark.complete("b2sum ")
6+
def test_1(self, completion):
7+
assert completion
8+
9+
@pytest.mark.complete("b2sum -", require_longopt=True)
10+
def test_options(self, completion):
11+
assert completion
12+

test/test-cmd-list.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ autoscan
2121
autossh
2222
avahi-browse
2323
awk
24+
b2sum
2425
badblocks
2526
base64
2627
bash

0 commit comments

Comments
 (0)