All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jilles Tjoelker <jilles@stack.nl>
To: Eric Blake <eblake@redhat.com>
Cc: Paul Gilmartin <PaulGBoulder@aim.com>, dash <dash@vger.kernel.org>
Subject: Re: [PATCH] [BUILTIN] Allow SIG* signal names.
Date: Tue, 3 Jul 2012 22:13:34 +0200	[thread overview]
Message-ID: <20120703201334.GA66099@stack.nl> (raw)
In-Reply-To: <4FF1AE9C.7040307@redhat.com>

On Mon, Jul 02, 2012 at 08:22:20AM -0600, Eric Blake wrote:
> On 07/02/2012 08:11 AM, Paul Gilmartin wrote:
> > On Jul 2, 2012, at 07:51, Eric Blake wrote:

> >> ... non-required bloat ...

> > The key phrase.  And one value of a shell lacking such
> > extensions is that it provides an excellent test bed for
> > code intended to be portable within the POSIX spec.

> That argues that we should drop our strcasecmp() for the much simpler
> strcmp(), in order to remove the bloat we already have.

Such a change would be at odds with the goal of dash to be a usable
shell. It is not good to break existing scripts, even if those scripts
are not strictly POSIX-compliant, and particularly so if the scripts
relied on designed behaviour. Such changes can waste a lot of time.

Leaving the behaviour unchanged (keeping case-insensitivity but not
adding support for the SIG prefix) would strike a balance between
usability and avoiding bloat.

Moreover, dash has many other extensions to POSIX, such as:

* A particular behaviour for "export" without parameters.

* The "local" builtin.

* The XSI "type" builtin (depending on whether you want to allow XSI or
  not).

* XSI-style signal numbers in the "trap" special builtin, and more of
  them than required.

* The XSI "ulimit" builtin, with many more options than the required -f.

* Function definitions consisting of a simple command, like
    f() echo hi

* A particular (probably useful) behaviour for double-quotes within
  backticks within double-quotes, like
    echo "`echo "hi there"`"

* A particular behaviour for double-quotes within Bourne-style parameter
  substitutions within double-quotes, like
    echo "${IFS+"*"}"

* Arithmetic expansion with a larger range than signed long (even though
  POSIX "encourages" this in non-normative text, it is not required).

Although dash is fairly minimalistic and may be useful in testing
scripts (also because it detects certain syntax errors sooner), its
usability goal makes that it has many non-mandatory features. You may
like posh which attempts to comply to Debian policy only, even at the
cost of usability.

-- 
Jilles Tjoelker

  parent reply	other threads:[~2012-07-03 20:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-01 10:12 [PATCH] [BUILTIN] Allow SIG* signal names Isaac Jurado
2012-07-02 13:51 ` Eric Blake
2012-07-02 14:11   ` Paul Gilmartin
2012-07-02 14:22     ` Eric Blake
2012-07-02 18:53       ` Isaac Jurado
2012-07-02 18:57         ` Isaac Jurado
2012-07-02 19:07         ` Eric Blake
2012-07-02 19:21           ` Isaac Jurado
2012-07-03 20:13       ` Jilles Tjoelker [this message]
2012-07-05  7:43         ` Herbert Xu
2012-07-05 21:01           ` Isaac Jurado

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=20120703201334.GA66099@stack.nl \
    --to=jilles@stack.nl \
    --cc=PaulGBoulder@aim.com \
    --cc=dash@vger.kernel.org \
    --cc=eblake@redhat.com \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.