[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add shell-quasiquote.
From: |
Stephen J. Turnbull |
Subject: |
Re: [PATCH] Add shell-quasiquote. |
Date: |
Thu, 22 Oct 2015 03:11:37 +0900 |
Eli Zaretskii writes:
> First, do csh and the rest really non-Posix? I wonder.
Yes. There is a definition of the syntax of the sh language in the
POSIX standard, and csh and friends do not conform. Bash and Zsh
don't conform exactly (eg, they provide extended globbing), but they
are nearly upward compatible with minimal sh.
> I always understood "Posix shells" as a short for "any shell on a
> Posix host". Is that incorrect? In what way are those
> "non-Posix"?
The syntax of scripts is different from the language defined in POSIX.
csh uses C-like braces for grouping, where sh uses additional keywords
like "then" and "fi" to mark stanzas. tclsh uses Tcl syntax, of
course. And so on....
> Next, I could see why users on a Posix host might want to execute
> some commands with a particular non-default shell. I don't see why
> Emacs packages, perhaps with a sole exception of Tramp, would need
> that.
Sometimes it pays to be precise. All of the OS distributions gave up
on bash because it didn't quite conform to POSIX (even when invoked in
POSIX compatibility mode), and that caused bugs in package
installation and management for packages that used sh scripts rather
than perl or python. That's why shells like ash and dash exist.
> > It would mainly be useful in the presence of a broader mechanism, which
> > doesn't exist yet, for executing POSIX shell scripts regardless of the
> > user's interactive shell.
>
> On Posix hosts? I thought that was automatic, since each script says
> what interpreter should run it in its "shebang" line. Right?
No. Unfortunately, there's a long history of systems (hel-lo, GNU!)
with /bin/sh linked to a non-conforming program. Weeding out all the
bashisms in Debian package management scripts took quite a bit of pain
and effort.
- Re: [PATCH] Add shell-quasiquote., (continued)
- Re: [PATCH] Add shell-quasiquote., Random832, 2015/10/20
- Re: [PATCH] Add shell-quasiquote., David Kastrup, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Random832, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Michael Albinus, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., David Kastrup, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/22
- Re: [PATCH] Add shell-quasiquote., Random832, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/21
- Re: [PATCH] Add shell-quasiquote.,
Stephen J. Turnbull <=
- Re: [PATCH] Add shell-quasiquote., David Kastrup, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Steinar Bang, 2015/10/26
- Re: [PATCH] Add shell-quasiquote., Wolfgang Jenkner, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Wolfgang Jenkner, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., John Wiegley, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Wolfgang Jenkner, 2015/10/22
- Re: [PATCH] Add shell-quasiquote., Jeff Clough, 2015/10/22
- Re: [PATCH] Add shell-quasiquote., David Kastrup, 2015/10/22