Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -3150,11 +3150,12 @@ _comp_complete_longopt()
}
# makeinfo and texi2dvi are defined elsewhere.
complete -F _comp_complete_longopt \
a2ps awk base64 bash bc bison cat chroot colordiff cp \
a2ps awk base{32,64,nc} bash bc bison cat chroot colordiff comm cp \
csplit cut date df diff dir du enscript expand fmt fold gperf \
grep grub head irb ld ldd less ln ls m4 mkdir mkfifo mknod \
mv netstat nl nm objcopy objdump od paste pr ptx readelf rm rmdir \
sed seq shar sort split strip sum tac tail tee \
mv netstat nl nm numfmt objcopy objdump od paste pr ptx readelf \
readlink realpath rm rmdir sed seq shar shred \
shuf sort split stat strip sum sync tac tail tee \
texindex touch tr uname unexpand uniq units vdir wc who

# @since 2.12
Expand Down
1 change: 1 addition & 0 deletions completions/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
/ciptool
/civclient
/civserver
/cksum
/_cloudquery
/_clusterctl
/clzip
Expand Down
3 changes: 2 additions & 1 deletion completions/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ CLEANFILES = \
ciptool \
civclient \
civserver \
cksum \
_cloudquery \
_clusterctl \
clzip \
Expand Down Expand Up @@ -1493,7 +1494,7 @@ endif
$(ss) sbcl \
sbcl-mt
$(ss) sha256sum \
b2sum md5sum shasum sha1sum sha224sum sha384sum sha512sum
b2sum cksum md5sum shasum sha1sum sha224sum sha384sum sha512sum
$(ss) _sops \
_kata-runtime _todoist
$(ss) ssh \
Expand Down
2 changes: 1 addition & 1 deletion completions/chgrp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ _comp_cmd_chgrp()
for w in "${words[@]}"; do
[[ $w == -@(R|-recursive) ]] && opts="-H -L -P" && break
done
_comp_compgen -- -W '-c -h -f -R -v --changes --dereference
_comp_compgen -- -W '-c -h -f -R -v --changes --dereference --from
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note, we'd be better off parsing instead of hardcoding, but that's something for another PR.

--no-dereference --silent --quiet --reference --recursive --verbose
--help --version $opts'
return
Expand Down
3 changes: 1 addition & 2 deletions completions/dd
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ _comp_cmd_dd()
;;
iflag=* | oflag=*)
_comp_compgen -c "${cur#*=}" -- -W 'append direct directory dsync
sync fullblock nonblock noatime nocache noctty nofollow
count_bytes skip_bytes seek_bytes'
sync fullblock nonblock noatime nocache noctty nofollow'
return
;;
status=*)
Expand Down
3 changes: 2 additions & 1 deletion completions/sha256sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ _comp_cmd_sha256sum()
_comp_compgen -v files filedir &&
_comp_compgen -- -X "*.$sumtype" -W '"${files[@]}"'
} &&
complete -F _comp_cmd_sha256sum b2sum md5sum sha{,1,224,256,384,512}sum
complete -F _comp_cmd_sha256sum b2sum cksum md5sum \
sha{,1,224,256,384,512}sum

# ex: filetype=sh
11 changes: 11 additions & 0 deletions test/t/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ EXTRA_DIST = \
test_awk.py \
test_b2sum.py \
test_badblocks.py \
test_base32.py \
test_base64.py \
test_basenc.py \
test_bash.py \
test_bc.py \
test_bind.py \
Expand Down Expand Up @@ -90,11 +92,13 @@ EXTRA_DIST = \
test_civclient.py \
test_civserver.py \
test_cksfv.py \
test_cksum.py \
test_cleanarch.py \
test_clisp.py \
test_clone_member.py \
test_co.py \
test_colordiff.py \
test_comm.py \
test_compare.py \
test_compgen.py \
test_complete.py \
Expand Down Expand Up @@ -427,6 +431,7 @@ EXTRA_DIST = \
test_nslookup.py \
test_nsupdate.py \
test_ntpdate.py \
test_numfmt.py \
test_objcopy.py \
test_objdump.py \
test_od.py \
Expand Down Expand Up @@ -521,7 +526,9 @@ EXTRA_DIST = \
test_rdesktop.py \
test_rdict.py \
test_readelf.py \
test_readlink.py \
test_readonly.py \
test_realpath.py \
test_remove_members.py \
test_removepkg.py \
test_renice.py \
Expand Down Expand Up @@ -568,7 +575,9 @@ EXTRA_DIST = \
test_sha512sum.py \
test_shar.py \
test_shellcheck.py \
test_shred.py \
test_shtab.py \
test_shuf.py \
test_sitecopy.py \
test_slabtop.py \
test_slackpkg.py \
Expand Down Expand Up @@ -596,6 +605,7 @@ EXTRA_DIST = \
test_sshfs.py \
test_sshmitm.py \
test_sshow.py \
test_stat.py \
test_strace.py \
test_stream.py \
test_strings.py \
Expand All @@ -608,6 +618,7 @@ EXTRA_DIST = \
test_svn.py \
test_svnadmin.py \
test_svnlook.py \
test_sync.py \
test_sync_members.py \
test_synclient.py \
test_sysbench.py \
Expand Down
11 changes: 11 additions & 0 deletions test/t/test_base32.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest


class TestBase32:
@pytest.mark.complete("base32 ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("base32 -", require_longopt=True)
def test_options(self, completion):
assert completion
11 changes: 11 additions & 0 deletions test/t/test_basenc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest


class TestBasenc:
@pytest.mark.complete("basenc ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("basenc -", require_longopt=True)
def test_options(self, completion):
assert completion
11 changes: 11 additions & 0 deletions test/t/test_cksum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest


class TestCksum:
@pytest.mark.complete("cksum ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("cksum -", require_longopt=True)
def test_options(self, completion):
assert completion
11 changes: 11 additions & 0 deletions test/t/test_comm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest


class TestComm:
@pytest.mark.complete("comm ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("comm -", require_longopt=True)
def test_options(self, completion):
assert completion
11 changes: 11 additions & 0 deletions test/t/test_numfmt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest


class TestNumfmt:
@pytest.mark.complete("numfmt ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("numfmt -", require_longopt=True)
def test_options(self, completion):
assert completion
11 changes: 11 additions & 0 deletions test/t/test_readlink.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest


class TestReadlink:
@pytest.mark.complete("readlink ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("readlink -", require_longopt=True)
def test_options(self, completion):
assert completion
11 changes: 11 additions & 0 deletions test/t/test_realpath.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest


class TestRealpath:
@pytest.mark.complete("realpath ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("realpath -", require_longopt=True)
def test_options(self, completion):
assert completion
11 changes: 11 additions & 0 deletions test/t/test_shred.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest


class TestShred:
@pytest.mark.complete("shred ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("shred -", require_longopt=True)
def test_options(self, completion):
assert completion
11 changes: 11 additions & 0 deletions test/t/test_shuf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest


class TestShuf:
@pytest.mark.complete("shuf ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("shuf -", require_longopt=True)
def test_options(self, completion):
assert completion
11 changes: 11 additions & 0 deletions test/t/test_stat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest


class TestStat:
@pytest.mark.complete("stat ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("stat -", require_longopt=True)
def test_options(self, completion):
assert completion
11 changes: 11 additions & 0 deletions test/t/test_sync.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest


class TestSync:
@pytest.mark.complete("sync ")
def test_1(self, completion):
assert completion

@pytest.mark.complete("sync -", require_longopt=True)
def test_options(self, completion):
assert completion
11 changes: 11 additions & 0 deletions test/test-cmd-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ avahi-browse
awk
b2sum
badblocks
base32
base64
basenc
bash
bc
bind
Expand All @@ -46,7 +48,9 @@ chsh
civclient
civserver
cksfv
cksum
colordiff
comm
configure
convert
cp
Expand Down Expand Up @@ -250,6 +254,7 @@ nmap
nproc
nsupdate
ntpdate
numfmt
objcopy
od
oggdec
Expand Down Expand Up @@ -320,6 +325,8 @@ radvdump
rdesktop
rdict
readelf
readlink
realpath
repomanage
reportbug
reptyr
Expand All @@ -346,7 +353,9 @@ sha384sum
sha512sum
shar
shellcheck
shred
shtab
shuf
sitecopy
slabtop
slapt-get
Expand All @@ -371,12 +380,14 @@ ssh-keygen
ssh-keyscan
sshmitm
sshow
stat
strace
strings
strip
su
sudo
sum
sync
synclient
sysbench
sysctl
Expand Down