Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: need for a fancier _pick_variant?
- X-seq: zsh-users 6729
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: need for a fancier _pick_variant?
- Date: Wed, 22 Oct 2003 01:51:25 -0500
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <1031022063903.ZM4449@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20031014062933.GC13457@xxxxxxxxxxxxxxxxxx> <1031022063903.ZM4449@xxxxxxxxxxxxxxxxxxxxxxx>
In the last episode (Oct 22), Bart Schaefer said:
> [ I've been busy and then away, so catching up on some old stuff. ]
>
> On Oct 13, 11:29pm, Danek Duvall wrote:
> }
> } _diff_options calls
> }
> } _pick_variant -c diff 'gnu=GNU' unix -v
> }
> } which doesn't match anything for Solaris diff, so the generic unix diff
> } options are chosen, and the result is thrown by the -u.
> }
> } Unfortunately, I don't know of any way of distinguishing Solaris diff by
> } its output, short of a brittle check of its usage statement.
>
> I don't have access to a Solaris machine. Does `diff -v` produce the
> usage message? If so, I suggest that you use the "brittle" test just
Solaris 2.8 and older don't have -u:
/usr/bin/diff: illegal option -- v
usage: diff [-bitw] [-c | -e | -f | -h | -n] file1 file2
diff [-bitw] [-C number] file1 file2
diff [-bitw] [-D string] file1 file2
diff [-bitw] [-c | -e | -f | -h | -n] [-l] [-r] [-s] [-S name] directory1 directory2
2.9 does:
/usr/bin/diff: illegal option -- v
usage: diff [-bitw] [-c | -e | -f | -h | -n | -u] file1 file2
diff [-bitw] [-C number | -U number] file1 file2
diff [-bitw] [-D string] file1 file2
diff [-bitw] [-c | -e | -f | -h | -n | -u] [-l] [-r] [-s] [-S name] directory1 directory2
--
Dan Nelson
dnelson@xxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author