Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: quoting bug, and comparisons with ksh93
- X-seq: zsh-workers 1406
- From: Bruce Stephens <stephens@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: quoting bug, and comparisons with ksh93
- Date: Fri, 21 Jun 1996 16:24:59 +0200
- In-reply-to: Zoltan Hidvegi's message of Fri, 21 Jun 1996 16:03:50 +0200 (MET DST)
- References: <199606211355.PAA03147@xxxxxxxxxxxxxxxxxx> <199606211403.QAA03198@xxxxxxxxxxxxxxxxx>
>>>>> "Zoltan" == Zoltan Hidvegi <hzoli@xxxxxxxxxx> writes:
>> >>>>> "Zefram" == Zefram <A.Main@xxxxxxxxxxxxxxxxx> writes:
>>
>> > setopt SH_WORD_SPLIT
>>
>> What does POSIX say?
> Zsh must be invoked as sh/ksh if you want POSIX. Even is sh/ksh
> mode there are some minor incompatibilities between zsh and POSIX
> but these rarely cause problems. Also the zsh documentation does
> not claim that zsh conforms to POSIX. On my computer /bin/sh is a
> link to zsh and it works fine.
That sounds fine then. It would be a shame to have SH_WORD_SPLIT be
the default: the current position is more logical, even if it does
sometimes fool me.
Moving to another topic, I was reading about ksh93 in the recent AT&T
book on reusable UNIX software. They've extended the pattern syntax
so it's equivalent to egrep style regexps (my guess is that zsh's are
pretty close), and added the nice touch that some option of print will
convert from a regexp to a ksh pattern. There are lots of handy
things for writing scripts, but I tend to use zsh only interactively,
so for all I know some of these may already exist, although some
definitely don't: I can't have a variable called a.fred, for example.
One interesting, and probably not too hard feature (now that TCL and
Perl have done it) is dynamic loading of commands (on systems which
support it). The idea is that they've written a library of routines
wc(argc, argv), basename(argc, argv) and so on which are all POSIX
implementations of the commands of the same names (so you can wrap a
10 line main around them to get the POSIX commands), and if you want
(and your machine supports it), you can arrange for ksh to dynamically
load this library, making lots of commands builtins. It would be a
nice addition to zsh, I think: the mechanism that Perl uses is more
complex, because of its different types, but TCL's extensions are just
bunches of routines which take (int argc, char **argv), so presumably
the mechanism it uses to dynamically load things could be borrowed.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author