summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:46:20 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:46:20 +0000
commitb780965281236345c6c45fbd379464accf5316ea (patch)
tree61c888fcd05dcda12a2fc348e24240e297e7bc3a /Completion
parent20d4d6cf127654b3151d6de245f2e978f4dc8765 (diff)
downloadzsh-b780965281236345c6c45fbd379464accf5316ea.tar.gz
zsh-b780965281236345c6c45fbd379464accf5316ea.tar.xz
zsh-b780965281236345c6c45fbd379464accf5316ea.zip
moved from Completion/User/_chown
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_chown19
1 files changed, 19 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_chown b/Completion/Unix/Command/_chown
new file mode 100644
index 000000000..40f38d2f4
--- /dev/null
+++ b/Completion/Unix/Command/_chown
@@ -0,0 +1,19 @@
+#compdef chown chgrp
+
+local suf
+
+if [[ CURRENT -eq 2 || CURRENT -eq 3 && $words[CURRENT-1] = -* ]]; then
+  if [[ $service = chgrp ]] || compset -P '*[:.]'; then
+    _groups
+  else
+    if [[ $OSTYPE = (solaris*|hpux*) ]]; then
+      suf=':'
+    else
+      suf='.'
+    fi
+    compset -S '.*' && unset suf
+    _users -S "$suf" -q
+  fi
+else
+  _files
+fi