zsh-workers
 help / color / mirror / code / Atom feed
From: hzoli@cs.elte.hu (Zoltan Hidvegi)
To: zsh-workers@math.gatech.edu (zsh-workers)
Subject: Re: Z-Shell Frequently-Asked Questions (monthly posting)
Date: Wed, 28 Jun 1995 20:16:12 +0100 (MET DST)	[thread overview]
Message-ID: <9506281816.AA21228@turan.elte.hu> (raw)
In-Reply-To: <26983.9506231110@pyro.swan.ac.uk> from "P.Stephenson@swansea.ac.uk" at Jun 23, 95 12:10:42 pm

> 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


       reply	other threads:[~1995-06-28 18:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <26983.9506231110@pyro.swan.ac.uk>
1995-06-28 19:16 ` Zoltan Hidvegi [this message]
1995-06-28 19:56   ` Richard Coleman
1995-06-29 10:02   ` P.Stephenson
1995-06-29 11:20     ` Zoltan Hidvegi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9506281816.AA21228@turan.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).