#compdef sha256sum autoload -U is-at-least _sha256sum() { typeset -A opt_args typeset -a _arguments_options local ret=1 if is-at-least 5.2; then _arguments_options=(-s -S -C) else _arguments_options=(-s -C) fi local context curcontext="$curcontext" state line _arguments "${_arguments_options[@]}" : \ '-b[]' \ '--binary[]' \ '-c[read checksums from the FILEs and check them]' \ '--check[read checksums from the FILEs and check them]' \ '-w[warn about improperly formatted checksum lines]' \ '--warn[warn about improperly formatted checksum lines]' \ '--status[don'\''t output anything, status code shows success]' \ '--quiet[don'\''t print OK for each successfully verified file]' \ '--ignore-missing[don'\''t fail or report status for missing files]' \ '--strict[exit non-zero for improperly formatted checksum lines]' \ '--tag[create a BSD style checksum]' \ '-t[read in text mode (default)]' \ '--text[read in text mode (default)]' \ '-z[end each output line with NUL, not newline, and disable file name escaping]' \ '--zero[end each output line with NUL, not newline, and disable file name escaping]' \ '-h[Print help]' \ '--help[Print help]' \ '-V[Print version]' \ '--version[Print version]' \ '::file:_files' \ && ret=0 } (( $+functions[_sha256sum_commands] )) || _sha256sum_commands() { local commands; commands=() _describe -t commands 'sha256sum commands' commands "$@" } if [ "$funcstack[1]" = "_sha256sum" ]; then _sha256sum "$@" else compdef _sha256sum sha256sum fi