about summary refs log tree commit diff
path: root/Completion/Builtins/_stat
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2000-04-01 20:43:43 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2000-04-01 20:43:43 +0000
commite025336f2f6d9f107ee1e03b9900f04af0544ba9 (patch)
tree37b0ce74587d42d4bcb024991526d2361fcdf04a /Completion/Builtins/_stat
parent20c5fbe688f24010c578c48d4b4d228f0e1a56c3 (diff)
downloadzsh-e025336f2f6d9f107ee1e03b9900f04af0544ba9.tar.gz
zsh-e025336f2f6d9f107ee1e03b9900f04af0544ba9.tar.xz
zsh-e025336f2f6d9f107ee1e03b9900f04af0544ba9.zip
Updated from list as far as 10376
Diffstat (limited to 'Completion/Builtins/_stat')
-rw-r--r--Completion/Builtins/_stat20
1 files changed, 15 insertions, 5 deletions
diff --git a/Completion/Builtins/_stat b/Completion/Builtins/_stat
index 3cdbb2618..5ba06388b 100644
--- a/Completion/Builtins/_stat
+++ b/Completion/Builtins/_stat
@@ -1,10 +1,20 @@
 #compdef stat
 
+local expl ret=1
+
 if [[ "$words[CURRENT-1]" = -[AH] ]]; then
-  compgen -A
+  _arrays
 else
-  [[ "$PREFIX[1]" = + ]] &&
-      compadd - +device +inode +mode +nlink +uid +gid +rdev +size \
-                +atime +mtime +ctime +blksize +block +link
-  _files
+  _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
 fi