HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/zsh/functions/Completion/Unix/_wc
#compdef wc gwc

local args

args=(
  '(-c --bytes)'{-c,--bytes}'[print byte counts]'
  '(-C -m --chars)'{-m,--chars}'[print character counts]'
  '(-w --words)'{-w,--words}'[print word counts]'
  '(-l --lines)'{-l,--lines}'[print line counts]'
)

if _pick_variant gnu=GNU unix --version; then
  args+=(
    '(*)--files0-from=[read NUL-terminated file list from specified file]:file:_files'
    '(-L --max-line-length)'{-L,--max-line-length}'[print longest line lengths]'
  )
else
  args=( -A "-*" "${(@)args:#(|\(*\))(|\*)--*}" )
  case $OSTYPE in
    freebsd*|netbsd*) args+=( '-L[print longest line lengths]' ) ;;
    openbsd*) args+=( '-h[human readable: use unit suffixes]' ) ;;
    solaris*) args+=( ${${(M)args:#*-m\[*}//-m\[/-C\[} ) ;;
  esac
fi

_arguments -s -S $args '*:file:_files'