From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26409 invoked by alias); 22 Dec 2011 23:48:19 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30044 Received: (qmail 2114 invoked from network); 22 Dec 2011 23:48:16 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at herc.mirbsd.org does not designate permitted sender hosts) Date: Thu, 22 Dec 2011 23:34:23 +0000 (UTC) From: Thorsten Glaser X-X-Sender: tg@herc.mirbsd.org To: Eric Blake , Bruce Korb cc: David Korn , austin-group-l@opengroup.org, Bash - Bug , zsh-workers@zsh.org, dash , miros-discuss@mirbsd.org Subject: Re: '>;' redirection operator In-Reply-To: <4EF3AA9A.9070009@gnu.org> Message-ID: References: <201112221539.pBMFdlaj011933@penguin.research.att.com> <4EF39B1E.80709@redhat.com> <4EF3AA9A.9070009@gnu.org> X-Message-Flag: Your mailer is broken. Get an update at http://www.washington.edu/pine/getpine/pcpine.html for free. MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Eric Blake dixit: >powerful approach. Can we get buy-in from other shell developers to >support '>;' as an atomic temp-file replacement-on-success idiom, if Urgh, PLEASE NOT! People complain about the readability of code enough already, and as practice shows, things like [[ have been around and nobody uses them anyway (often using just POSIX, but not even knowing =E2=80=93 myself inclu= ded =E2=80=93 that POSIX sh has $((=E2=80=A6))=E2=81=BA; or even using less-tha= n-POSIX, e.g. in autoconf, which means that anything we were to introduce now would not be used in the places where it counts anyway, for compatibility). =E2=81=BA) Reminds me to write to the list about that. Buried in dayjob wor= k atm though. Expect something about that next year. Bruce Korb dixit: > slide on slippery slopes. Shells can always add some useful builtins: > > sh_move_if_changed > sh_save_on_success > sh_save_on_failure In mksh, practice is to keep such things out of the core code and optionally put it into ~/.mkshrc instead. The pushd/popd/dirs code is a prime example of it. Also, this way, the shell is extended in shell instead of in C. (I=E2=80=99ve seen the C201x draft this week. This drives home _that_ point even better. That=E2=80=99s bloat, not C any more.= ) Many languages have standard libraries written in that language itself, for better portability and easier maintenance, so I=E2=80=99d say do it like that. Heck, https://evolvis.org/projects/shellsnippets/ (disclaimer: a pet project of a coworker and me) is waiting for more contributions. (Hosted at my current employer, that=E2=80=99s why I untypically-for-me chose git so nobody needs to fear they could take it down.) Oh, and: sed. has. no. -i. option. either. Please. There=E2=80=99s a perfectly fine ed, man! man ed! for that. bye, //mirabilos --=20 FWIW, I'm quite impressed with mksh interactively. I thought it was much *much* more bare bones. But it turns out it beats the living hell out of ksh93 in that respect. I'd even consider it for my daily use if I hadn't wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh