summary refs log tree commit diff
path: root/Completion/User/_chown
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/User/_chown')
-rw-r--r--Completion/User/_chown15
1 files changed, 15 insertions, 0 deletions
diff --git a/Completion/User/_chown b/Completion/User/_chown
new file mode 100644
index 000000000..1ec76b39e
--- /dev/null
+++ b/Completion/User/_chown
@@ -0,0 +1,15 @@
+#compdef chown chgrp
+
+if [[ CURRENT -eq 2 || CURRENT -eq 3 && $words[CURRENT-1] = -* ]]; then
+  if [[ $words[1] = chgrp ]] || compset -P '*[:.]'; then
+    _groups
+  else
+    if [[ $OSTYPE = (solaris*|hpux*) ]]; then
+      compgen -u -S ':' -q
+    else
+      compgen -u -S '.' -q
+    fi
+  fi
+else
+  _files
+fi