zsh-workers
 help / color / mirror / code / Atom feed
303775b23b31ea22a938735625aeba6b6c327655 blob 832 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
 
#compdef stat zstat

local expl ret=1

if [[ "$words[CURRENT-1]" = -[AH] ]]; then
  _arrays
elif [[ $service == zstat ]] ||
     (( ${+builtins[stat]} )) || 
     { (( ! ${+builtins} )) && [[ $(type -w stat) == '*: builtin' ]] }
then
  _tags files options || return 1

  while _tags; do
    _requested files && _files && ret=0
    _requested options &&
        { ! zstyle -T ":completion:${curcontext}:options" prefix-needed ||
          [[ "$PREFIX[1]" = + || ret -eq 1 ]] } &&
        _all_labels options expl 'inode element' \
            compadd - +device +inode +mode +nlink +uid +gid +rdev \
                      +size +atime +mtime +ctime +blksize +block +link
    (( ret )) || return 0
  done
else
  # TODO: system-specific completion
  # TODO: choose this codepath if 'command stat ...' or '=stat ...' is used
  _files
fi
debug log:

solving 303775b23 ...
found 303775b23 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).