From b346c4796b3abdadd31cb0999d2f099ce9aa79af Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Sun, 27 Jun 1999 05:33:25 +0000 Subject: Initial revision --- Completion/User/_chown | 15 +++++++++++++++ Completion/User/_groups | 6 ++++++ 2 files changed, 21 insertions(+) create mode 100644 Completion/User/_chown create mode 100644 Completion/User/_groups (limited to 'Completion/User') 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 diff --git a/Completion/User/_groups b/Completion/User/_groups new file mode 100644 index 000000000..975189174 --- /dev/null +++ b/Completion/User/_groups @@ -0,0 +1,6 @@ +#compdef newgrp + +: ${(A)groups:=${${(s: :)$(