zsh-workers
 help / color / mirror / code / Atom feed
From: Eric Cook <llua@gmx.com>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: [[ is being treated as a pattern in the command/reserved word position.
Date: Sat, 28 Mar 2015 20:09:54 -0400	[thread overview]
Message-ID: <551742D2.6090104@gmx.com> (raw)
In-Reply-To: <5441381427587060@web10j.yandex.ru>

On 03/28/2015 07:57 PM, ZyX wrote:
> There is also another consideration: POSIX does not define `[[`. So
> when you run an emulation mode *what exactly* should `[[` do? When
> emulating `bash` (not present for some reason) or `ksh` this is
> defined by those shells, but `sh` is clearly not a bash emulation
> (reasoning: BASH_REMATCH is not set) and not ksh emulation (reasoning:
> `emulate ksh` is a distinct emulation mode and `sh` emulation mode is
> not referenced as an alias of `ksh` emulation mode). I have failed to
> find what zsh developers meant by `sh` emulation exactly though: it is
> not explicitly said that it emulates POSIX shell. But since it not
> bash or ksh emulation mode `[[ $w ]]` in the above case should be
> `false` (busybox emulation) or a command-not-found error (posh or dash
> emulation). 
>From my understanding of emulate, it works similar to bash's posix mode.
Changing anything that conflicts with the mode, but doesn't disable
other non-conflicting extensions.

Distros like Arch Linux relies on it to source their /etc/profile from
the global zprofile is more sh like environment.
(with the added perk of stuff like [[ working.)
I've also been using it for stuff like that for a long time and would
appreciate it staying the way it currently is.


  reply	other threads:[~2015-03-29  0:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-28 21:08 Eric Cook
2015-03-28 21:18 ` Eric Cook
2015-03-28 21:25 ` Eric Cook
2015-03-28 21:36 ` ZyX
2015-03-28 21:44 ` Bart Schaefer
2015-03-28 21:55   ` Eric Cook
2015-03-28 22:24     ` Bart Schaefer
2015-03-28 22:33       ` ZyX
2015-03-28 22:45         ` Bart Schaefer
2015-03-28 23:07         ` Eric Cook
2015-03-28 23:19           ` ZyX
2015-03-28 23:27             ` Eric Cook
2015-03-28 23:57               ` ZyX
2015-03-29  0:09                 ` Eric Cook [this message]
2015-03-28 22:44       ` Peter Stephenson
2015-03-28 22:48         ` Bart Schaefer

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=551742D2.6090104@gmx.com \
    --to=llua@gmx.com \
    --cc=zsh-workers@zsh.org \
    /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).