From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add shell-quasiquote. Date: Thu, 22 Oct 2015 03:11:37 +0900 Message-ID: <22055.54617.848927.986392@turnbull.sk.tsukuba.ac.jp> References: <87si59wj42.fsf@T420.taylan> <87zizfm2dq.fsf@T420.taylan> <871tcr7yvq.fsf@fastmail.com> <87mvvfm0bd.fsf@T420.taylan> <56250803.5080601@cs.ucla.edu> <87a8ren5ys.fsf@T420.taylan> <56259BB1.3070908@cs.ucla.edu> <878u6ykmvt.fsf@T420.taylan> <87h9llvo98.fsf@members.fsf.org> <5626622A.3090707@yandex.ru> <87zizdijbp.fsf@T420.taylan> <56267302.7050606@yandex.ru> <87io61igyu.fsf@T420.taylan> <56267CDF.6010201@yandex.ru> <87wpuhh15s.fsf@T420.taylan> <562683B9.1060305@yandex.ru> <83y4exe71v.fsf@gnu.org> <87y4ewoqbs.fsf@fastmail.com> <83si54e2qx.fsf@gnu.org> <87y4ew8fue.fsf@fastmail.com> <83zizcurco.fsf@gnu.org> <87k2qgw3q1.fsf@fastmail.com> <83lhawuny4.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1445451140 11574 80.91.229.3 (21 Oct 2015 18:12:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Oct 2015 18:12:20 +0000 (UTC) Cc: Random832 , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 21 20:12:15 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zoxrq-0000ku-QZ for ged-emacs-devel@m.gmane.org; Wed, 21 Oct 2015 20:12:06 +0200 Original-Received: from localhost ([::1]:53340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zoxrp-0004QM-OS for ged-emacs-devel@m.gmane.org; Wed, 21 Oct 2015 14:12:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zoxrg-0004Gg-9o for emacs-devel@gnu.org; Wed, 21 Oct 2015 14:12:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zoxrb-0003J1-A2 for emacs-devel@gnu.org; Wed, 21 Oct 2015 14:11:56 -0400 Original-Received: from turnbull.sk.tsukuba.ac.jp ([130.158.96.25]:33956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoxrU-0003Gx-Lr; Wed, 21 Oct 2015 14:11:44 -0400 Original-Received: from steve by turnbull.sk.tsukuba.ac.jp with local (Exim 4.86) (envelope-from ) id 1ZoxrO-0006Wi-20; Thu, 22 Oct 2015 03:11:38 +0900 In-Reply-To: <83lhawuny4.fsf@gnu.org> X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta34) "kale" 698a9aa86de4 XEmacs Lucid (x86_64-apple-darwin14.5.0) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: steve@turnbull.sk.tsukuba.ac.jp X-SA-Exim-Scanned: No (on turnbull.sk.tsukuba.ac.jp); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 130.158.96.25 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:192307 Archived-At: 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.