blob: 73bbef471a1914759bc86f80ab75736874381879 (
plain) (
blame)
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
29
30
31
32
33
|
#compdef stat zstat
local expl ret=1
if [[ $service == zstat ]] ||
(( ${+builtins[stat]} )) ||
{ (( ! ${+builtins} )) && [[ $(type -w stat) == '*: builtin' ]] }
then
_arguments -s -S : \
'(-H)-A[assign the results to array, don'\''t print]:array variable:_parameters -g "*array*"' \
- set1 \
+device +inode +mode +nlink +uid +gid +rdev \
+size +atime +mtime +ctime +blksize +block +link \
'(-A)-H[assign the results to associative array, don'\''t print]:associative array variable:_parameters -g "*association*"' \
'(:)-f[stat a file descriptor]:file descriptor:_file_descriptors' \
'(-s)-F:strftime(3) format string:_date_formats zsh' \
'(-s)-g[show times in GMT/UTC]' \
'-L[don'\''t dereference symbolic links; use lstat(2)]' \
'(-N)-n[always show names of files]' \
'(-n)-N[never show names of files]' \
'-o[print file modes in octal rather than decimal]' \
'-r[print raw data]' \
'-s[print mode,uid,gid and times as strings]' \
'(-T)-t[always show type names]' \
'(-t)-T[never show type names]' \
'*:files to stat:_files' \
- set2 \
'-l[list stat types]'
else
# TODO: system-specific completion
# TODO: choose this codepath if 'command stat ...' or '=stat ...' is used
_files
fi
|