Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: New completions
- X-seq: zsh-workers 6715
- From: Tanaka Akira <akr@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: New completions
- Date: 18 Jun 1999 22:27:13 +0900
- In-reply-to: "Kiddle, Oliver"'s message of "Fri, 18 Jun 1999 13:49:40 +0100"
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <4FBF540FF16FD1119D9600A0C94B2B51F29E91@xxxxxxxxxxxxxxxxxxx>
In article <4FBF540FF16FD1119D9600A0C94B2B51F29E91@xxxxxxxxxxxxxxxxxxx>,
"Kiddle, Oliver" <KiddleO@xxxxxxxxxx> writes:
> Does SunOS return solaris in $OSTYPE then - that's suprising.
Yes. It's bit tricky. But it works well because $OSTYPE is sunos4.* in
SunOS 4.x and solaris2.* in SunOS 5.x even in SunOS 5.7 --- Solaris 7.
# chown in SunOS 4.x supports "." only.
> HP/UX also
> uses a ':' so should be added to the pattern. I don't have access to it any
> more so can't tell you what it gives in $OSTYPE. I'd suggest using an if
> then else instead of the case statement as I've never seen a chown using
> anything other than . or :.
I don't know $OSTYPE in HP/UX too since I never use HP/UX.
--- Completion/User/_chown- Fri Jun 18 20:55:51 1999
+++ Completion/User/_chown Fri Jun 18 22:11:13 1999
@@ -1,10 +1,14 @@
#compdef chown chgrp
if [[ CURRENT -eq 2 || CURRENT -eq 3 && $words[CURRENT-1] = -* ]]; then
- if [[ $words[1] = chgrp ]] || compset -P '*.'; then
+ if [[ $words[1] = chgrp ]] || compset -P '*[:.]'; then
_groups
else
- compgen -u -S '.' -q
+ if [[ $OSTYPE = solaris* ]]; then
+ compgen -u -S ':' -q
+ else
+ compgen -u -S '.' -q
+ fi
fi
else
_files
--
Tanaka Akira
Messages sorted by:
Reverse Date,
Date,
Thread,
Author