From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id EAA06310 for ; Thu, 29 Jun 1995 04:29:29 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA06570 (5.65c/Gatech-10.0-IDA for ); Wed, 28 Jun 1995 14:21:32 -0400 Received: by math (5.x/SMI-SVR4) id AA04334; Wed, 28 Jun 1995 14:16:57 -0400 Resent-Date: Wed, 28 Jun 1995 20:16:12 +0100 (MET DST) Old-Return-Path: From: hzoli@cs.elte.hu (Zoltan Hidvegi) Message-Id: <9506281816.AA21228@turan.elte.hu> Subject: Re: Z-Shell Frequently-Asked Questions (monthly posting) To: zsh-workers@math.gatech.edu (zsh-workers) Date: Wed, 28 Jun 1995 20:16:12 +0100 (MET DST) In-Reply-To: <26983.9506231110@pyro.swan.ac.uk> from "P.Stephenson@swansea.ac.uk" at Jun 23, 95 12:10:42 pm X-Mailer: ELM [version 2.4 PL21] Content-Type: text Resent-Message-Id: <"5Lh6P1.0.e31.PoPyl"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/120 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > B1) Differences from sh and ksh > ... > Command line substitutions, globbing etc.: Just one addition here: foo=* assignment assigns the list of files in the current directory as an array to foo if there are at least two matches, or if there is a single file in the directory, foo becames a scalar whose value is the name of that file. Other Bourne shells does not glob the right hand side of assignments. In my releases the default behaviour is to not glob here, but this can be changed by setting the GLOB_ASSIGN option. > The $((...)) version of numeric evaluation was not available before > version 2.6 (use $[...]). And even in vanila 2.6 $((...)) is done after fork, hence if used as an argument to an external program, assignments inside $((...) has no effect. Of course this bug is also fixed in my release. > Treatment of backslashes within backquotes is subtly different. I still do not know about such differences. I use zsh as /bin/sh without probles, so there are probably no differences. Either remove that not, or give an example. > $PSn do not do parameter substitution by default (use PROMPT_SUBST). And even if PROMPT_SUBST is set, things like ${foo#*bar} does not work properly in prompts. Thats also fixed in my release. > However, zsh has no claims towards Posix compliancy and will not use Could anyone tell me how zsh differs from POSIX if invoked as sh? There is an other thing where zsh differs from e.g. bash: characters in the range 0x80-0x9b (or may be between 0x80-0x9f) cannot be used in scripts and such characters in backquote or parameter substitutions are discarded (or interpreted in a completely wrong way). That because these are used for tokenization, hence to fix it, major parts of zsh would have to be rewritten. > ... > Of course, this makes zsh rather large and quite messy so that it But zsh is only a little bit larger than bash or tcsh, and it seems to use much less memory and CPU time than tcsh. Cheers, Zoltan