summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_shasum
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2018-08-27 13:31:04 +0200
committerAxel Beckert <abe@deuxchevaux.org>2018-08-27 13:31:04 +0200
commit719a715614f2182a76b30ad27a327d70a86f34f1 (patch)
treea437eb29da8035bf7c2e30506c08fe6f15719871 /Completion/Unix/Command/_shasum
parent7da8d19c224860ae4d6aa3f077fca7f734f20d88 (diff)
parentef61918398517473b9b594690a3be375f607cebe (diff)
downloadzsh-719a715614f2182a76b30ad27a327d70a86f34f1.tar.gz
zsh-719a715614f2182a76b30ad27a327d70a86f34f1.zip
Merge tag 'zsh-5.5.1-test-2' into debian
Test release: 5.5.1-test-2.
Diffstat (limited to 'Completion/Unix/Command/_shasum')
-rw-r--r--Completion/Unix/Command/_shasum24
1 files changed, 24 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_shasum b/Completion/Unix/Command/_shasum
new file mode 100644
index 000000000..950a47763
--- /dev/null
+++ b/Completion/Unix/Command/_shasum
@@ -0,0 +1,24 @@
+#compdef shasum -P shasum(|5).*
+
+# This function covers the `shasum` script included with Perl (and notably the
+# primary SHA digest tool on macOS). See `_md5sum` for the GNU digest utilities
+# and `_cksum` for the BSD ones.
+#
+# @todo It's possible that someone could symlink this script to `sha1sum` or
+# whatever; we might want to detect that some day.
+
+_arguments -s -S : \
+ '(: -)'{-h,--help}'[display help information]' \
+ '(: -)'{-v,--version}'[display version information]' \
+ + '(sum)' \
+ '(chk)'{-0,--01}'[read in BITS mode]' \
+ '(chk)'{-b,--binary}'[read in binary mode]' \
+ '(chk)'{-p,--portable}'[read in portable mode]' \
+ '(chk)'{-t,--text}'[read in text mode]' \
+ + 'chk' \
+ '(sum)'{-c,--check}'[verify checksums from input files]' \
+ '(sum -s -w --status --warn)'{-s,--status}'[suppress all output]' \
+ '(sum -s -w --status --warn)'{-w,--warn}'[warn about each improperly formatted checksum line]' \
+ + misc \
+ '(-a --algorithm)'{-a+,--algorithm=}'[specify algorithm]:algorithm:(1 224 256 384 512 512224 512256)' \
+ '*: :_files'