zsh-workers
 help / color / mirror / code / Atom feed
83f42e6d3d71d2e3639c7f11ac66ed5e3736b409 blob 978 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
#compdef shuf gshuf

local ret=1
local -a context line state state_descr
local -A opt_args

_arguments -s -S : \
  '(: -)--help[display help information]' \
  '(: -)--version[display version information]' \
  '(-n --head-count)'{-n+,--head-count=}'[limit output to specified number of lines]:output line limit' \
  '(-o --output)'{-o+,--output=}'[write result to specified file]:output file:_files' \
  '--random-source=[use specified file as source of random bytes]: :_files' \
  '(-r --repeat)'{-r,--repeat}'[allow output lines to repeat]' \
  '(-z --zero-terminated)'{-z,--zero-terminated}'[use NUL as line delimiter]' \
  '(-i --input-range)*: :->operands' \
  + '(excl)' \
  {-e,--echo}'[treat operands as input lines]' \
  '(:)'{-i+,--input-range=}'[treat specified numbers as input lines]:number range (x-y)' \
&& ret=0

[[ $state == operands ]] &&
if [[ -n ${opt_args[(i)excl-(-e|--echo)]} ]]; then
  _message 'input line' && ret=0
else
  _files && ret=0
fi

return ret
debug log:

solving 83f42e6d3 ...
found 83f42e6d3 in https://git.vuxu.org/mirror/zsh/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).