From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: tuhs-bounces@minnie.tuhs.org X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 8003d737 for ; Wed, 8 Aug 2018 12:12:45 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id AF905A1A3C; Wed, 8 Aug 2018 22:12:44 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id DCF6DA19CD; Wed, 8 Aug 2018 22:10:45 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=F6Njinae; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 758CCA19CD; Wed, 8 Aug 2018 22:10:42 +1000 (AEST) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by minnie.tuhs.org (Postfix) with ESMTPS id C134CA19CC for ; Wed, 8 Aug 2018 22:10:37 +1000 (AEST) Received: by mail-ed1-f53.google.com with SMTP id e19-v6so1130017edq.7 for ; Wed, 08 Aug 2018 05:10:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:mime-version:subject:date:references:to:in-reply-to :message-id; bh=YK4wYGyklh/ptuWox65HTZEIIq3TElcW1BQYI2hTeYk=; b=F6Njinae/yWmaajRNpg2HS0btjK23NSAjKhCE27SAxOfBazyGz6RwUQZnCYTO1n+u0 bG84OsswoFUoXR9fRK+X4JgXbvrYgoTqykFpH1plrtDWTvRDikOp1CcwTY6tlZ8Fx7ZF b7OwvPlMKOOQQ6AmLIo1AhowvaLm2bD5ejdHaxYmP+nX/4H27gxKgEnNriM2a4PclzeK pdgjS8Petadwc1HPF7RMn+pUeMZqrzCArkHNZXCz1A7y+b3ppoGeirV9Vfn72bHu0X6N 1CihcVlz1Qyd0H/fy/k7+hfZ2Qmd4s2EvjOA78JuFBtYUGl71luHGuo9xsdvo7cvFMS9 TrSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:mime-version:subject:date:references :to:in-reply-to:message-id; bh=YK4wYGyklh/ptuWox65HTZEIIq3TElcW1BQYI2hTeYk=; b=cM2AVh4O8Iz+eGNa3qIqQlysNSnxNuaay6h7IIyL20qH1UtXrKpLr//dB/9oV4Kg2d YRsyzB5QWLNAMredW+r3y6iN4xyO8law4JlSttZlfKHohyFrk+R2W8G+8cFZxRUNi5vs 2cZMTfPtZYBgY4Lh+zvEwgcoyZftlUJZTHxwnt3c0UG/r5EiqF9v19JfyKPMeXI6k3/e TFbLNTUz4hXFyr6vwlQObbvM9w0BcjTx1H5LYMF0TJFs4EC2nlXqXZXnjzMXAnIUpeRk 2/JIJYg+FcpqWgyUMaSA7h08UqRIHjsnO9QUbjp/wjz8cyaXDsDdbkWOlh+aKWDTG4yL Udbw== X-Gm-Message-State: AOUpUlEmr1UIUkG79EYTx7mk7fdSWdanOAh600A7hO6sbJTEwqMrfwlx 5gvEBTwoGZP3Go4SHROsIrU10ZAb X-Google-Smtp-Source: AA+uWPyZt5KoZEIWNv18sWbwf0jCnJBcuGQKRHOXbVU54gayTg4j3U9lhdxiMm/nXVPJG0tDTAxGcA== X-Received: by 2002:a50:8921:: with SMTP id e30-v6mr2976680ede.213.1533730235747; Wed, 08 Aug 2018 05:10:35 -0700 (PDT) Received: from [192.168.0.52] (i36138.upc-i.chello.nl. [62.195.36.138]) by smtp.gmail.com with ESMTPSA id b58-v6sm4399624ede.37.2018.08.08.05.10.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Aug 2018 05:10:34 -0700 (PDT) From: Don Hopkins X-Google-Original-From: Don Hopkins Content-Type: multipart/alternative; boundary="Apple-Mail=_671DFDFE-B9BD-4A37-87A5-907FB3046664" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Date: Wed, 8 Aug 2018 14:10:32 +0200 References: To: tuhs@minnie.tuhs.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3445.9.1) Subject: Re: [TUHS] TUHS Digest, Vol 33, Issue 7 X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --Apple-Mail=_671DFDFE-B9BD-4A37-87A5-907FB3046664 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Decades ago I made my prompt simply end with a newline, which perfectly = and cleanly solves the problem of making it easy to copy and paste a = whole line by multiple clicking in a terminal emulator to select the = line, or by using line oriented commands in an emacs shell (or moving to = the line and hitting return, which Emacs often regularly fucks up with = its idiotic kludges to identify the prompt with invisible marks and = regular expressions), without injecting any garbage characters into the = beginning of the command line or requiring any extra mouse clicks, = precision cursor targeting, or extra keystrokes. Using =E2=80=9C;=E2=80=9D or any other character as a prompt is an ugly = hack, and doesn=E2=80=99t solve the problem thoroughly or cleanly. No = matter what character you use as a prompt at the beginning of the line, = it=E2=80=99s going to cause some problems, like semicolons building up = each time you re-enter the line, or conflicts with built-in shell syntax = (retch!), so the only logical (and most obvious) solution is not to use = any characters at the beginning of the line at all, and just put the = prompt on a line above on its own. There is no downside to that, unless = it somehow offends your sense of aesthetics. (In which case you should = get over it.)=20 That=E2=80=99s the cleanest solution without any unpleasant side = effects. I don=E2=80=99t understand why that solution isn=E2=80=99t the = first thing shell users think of, and the default used by the shell =E2=80= =94 it=E2=80=99s so obvious. Maybe because people used to the shell are = just so accustomed to having to deal with mashing together unpleasant = hackey kludgy incompatible competing ad-hoc syntax that it would never = occur to them that it=E2=80=99s possible to solve a problem by REMOVING = punctuation and noise characters instead of ADDING more of them.=20 -Don > On 8 Aug 2018, at 04:00, tuhs-request@minnie.tuhs.org wrote: >=20 > Send TUHS mailing list submissions to > tuhs@minnie.tuhs.org >=20 > To subscribe or unsubscribe via the World Wide Web, visit > https://minnie.tuhs.org/cgi-bin/mailman/listinfo/tuhs > or, via email, send a message with subject or body 'help' to > tuhs-request@minnie.tuhs.org >=20 > You can reach the person managing the list at > tuhs-owner@minnie.tuhs.org >=20 > When replying, please edit your Subject line so it is more specific > than "Re: Contents of TUHS digest..." > Today's Topics: >=20 > 1. Re: Origins of shell prompt suffixes % $ > # (Michael Kj=C3=B6rling= ) > 2. Re: Origins of shell prompt suffixes % $ > # (Kurt H Maier) > 3. Re: Origins of shell prompt suffixes % $ > # (arnold@skeeve.com) > 4. Re: Origins of shell prompt suffixes % $ > # (Bakul Shah) > 5. Re: Origins of shell prompt suffixes % $ > # (Michael Kj=C3=B6rling= ) > 6. Re: Origins of shell prompt suffixes % $ > # (Dave Horsfall) > 7. Re: Origins of shell prompt suffixes % $ > # (KatolaZ) > 8. Re: TUHS Digest, Vol 33, Issue 5 (Steve Johnson) > 9. Re: Origins of shell prompt suffixes % $ > # (Tony Finch) > 10. Re: Origins of shell prompt suffixes % $ > # (Pete Turnbull) > 11. Re: Origins of shell prompt suffixes % $ > # (Doug McIlroy) > 12. Re: Origins of shell prompt suffixes % $ > # (Brian Zick) > 13. Re: Origins of shell prompt suffixes % $ > # (John P. Linderman) > 14. Re: Origins of shell prompt suffixes % $ > # (Lyndon Nerenberg) > 15. Re: Origins of shell prompt suffixes % $ > # (C=C3=A1g) > 16. Re: Origins of shell prompt suffixes % $ > # (arnold@skeeve.com) > 17. Re: Origins of shell prompt suffixes % $ > # (C=C3=A1g) > 18. Re: Origins of shell prompt suffixes % $ > # (Brian Zick) >=20 > From: Michael Kj=C3=B6rling > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 08:54:54 CEST > To: tuhs@minnie.tuhs.org >=20 >=20 > On 6 Aug 2018 21:53 +0100, from brian@zick.io (Brian Zick): >> rc uses ; >=20 > Not sure what came first, and not up to digging out the history books, > but these days, a plain `;` for a prompt has a distinct advantage in > that you can copy the whole line and paste it into another shell, and > the shell will do The Right Thing (tm) as long as (as is, I believe, > done by all of the major shells at least) it uses `;` for command > separation. >=20 > --=20 > Michael Kj=C3=B6rling =E2=80=A2 https://michael.kjorling.se =E2=80=A2 = michael@kjorling.se > =E2=80=9CThe most dangerous thought that you can have as a creative = person > is to think you know what you=E2=80=99re doing.=E2=80=9D = (Bret Victor) >=20 >=20 >=20 >=20 > From: Kurt H Maier > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 09:31:36 CEST > To: Brian Zick > Cc: tuhs@minnie.tuhs.org >=20 >=20 > On Mon, Aug 06, 2018 at 09:53:33PM +0100, Brian Zick wrote: >>=20 >> rc uses ; >=20 > Does it? 10th edition Unix and Plan 9 rc both have ('% ' ' ') as the = =20 > default value of $prompt. At least that's how it's described in the > manual. None of the v8/9/10 tarballs in the archive contain rc code, > but some contain manual source, and those describe % prompts. >=20 > I've seen other references to ; (presumably ('; ' ' ')) as the rc=20 > prompt but I've never seen it in the wild. Does anyone here know what=20= > the story is? >=20 > khm >=20 >=20 >=20 >=20 > From: arnold@skeeve.com > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 09:50:21 CEST > To: khm@sciops.net, brian@zick.io > Cc: tuhs@minnie.tuhs.org >=20 >=20 > Kurt H Maier wrote: >=20 >> On Mon, Aug 06, 2018 at 09:53:33PM +0100, Brian Zick wrote: >>>=20 >>> rc uses ; >>=20 >> Does it? 10th edition Unix and Plan 9 rc both have ('% ' ' ') as the = =20 >> default value of $prompt. At least that's how it's described in the >> manual. None of the v8/9/10 tarballs in the archive contain rc code, >> but some contain manual source, and those describe % prompts. >>=20 >> I've seen other references to ; (presumably ('; ' ' ')) as the rc=20 >> prompt but I've never seen it in the wild. Does anyone here know = what=20 >> the story is? >>=20 >> khm >=20 > I believe that Tom Duff's rc does indeed use ('% ' ' '). But I think = that > Byron Rakitsis's version changed the default to ('; ' ' ') exactly for > the reason that it's copyable/pastable. >=20 > HTH, >=20 > Arnold >=20 >=20 >=20 >=20 > From: Bakul Shah > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 09:57:11 CEST > To: Kurt H Maier > Cc: Brian Zick , tuhs@minnie.tuhs.org >=20 >=20 > On Tue, 07 Aug 2018 00:31:36 -0700 Kurt H Maier = wrote: >> On Mon, Aug 06, 2018 at 09:53:33PM +0100, Brian Zick wrote: >>>=20 >>> rc uses ; >>=20 >> Does it? 10th edition Unix and Plan 9 rc both have ('% ' ' ') as the = =20 >> default value of $prompt. At least that's how it's described in the >> manual. None of the v8/9/10 tarballs in the archive contain rc code, >> but some contain manual source, and those describe % prompts. >>=20 >> I've seen other references to ; (presumably ('; ' ' ')) as the rc=20 >> prompt but I've never seen it in the wild. Does anyone here know = what=20 >> the story is? >=20 > The es shell (by Haar and Rakitzis) used ; - the reason (as > per the man page)is that a user can cut-n-paste a previous > line to rexecute it (for the same reason people use term% and > cpu% functions to execute their args). Es syntax was derived > from rc, which may be why the confusion. >=20 >=20 >=20 >=20 > From: Michael Kj=C3=B6rling > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 10:02:56 CEST > To: tuhs@minnie.tuhs.org >=20 >=20 > On 7 Aug 2018 06:54 +0000, from michael@kjorling.se (Michael = Kj=C3=B6rling): >> the shell will do The Right Thing (tm) >=20 > I suspect I must stand corrected on this. Turns out that at least GNU > bash 4.4.12(1) seems to not like a `;` at the beginning of the command > line. >=20 > $ /bin/bash --version | head -n1 > GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu) > $ /bin/bash > $ ; true > bash: syntax error near unexpected token `;' > $ echo $? > 2 > $ >=20 > Hopefully other shells are more sane. >=20 > --=20 > Michael Kj=C3=B6rling =E2=80=A2 https://michael.kjorling.se =E2=80=A2 = michael@kjorling.se > =E2=80=9CThe most dangerous thought that you can have as a creative = person > is to think you know what you=E2=80=99re doing.=E2=80=9D = (Bret Victor) >=20 >=20 >=20 >=20 > From: Dave Horsfall > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 10:23:37 CEST > To: The Eunuchs Hysterical Society >=20 >=20 > On Tue, 7 Aug 2018, Michael Kj=C3=B6rling wrote: >=20 >> Hopefully other shells are more sane. >=20 > The MacBook here runs GNU bash, version 3.2.57(1)-release = (x86_64-apple-darwin16) and is equally busted, as is plain "sh" on both = the Mac and FreeBSD (I can't be bothered checking the Penguin); I use = ZSH on FreeBSD and it does The Right Thing (tm), as does ZSH on the Mac. >=20 > -- Dave >=20 >=20 > From: KatolaZ > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 10:37:23 CEST > To: tuhs@minnie.tuhs.org >=20 >=20 > On Tue, Aug 07, 2018 at 06:23:37PM +1000, Dave Horsfall wrote: >> On Tue, 7 Aug 2018, Michael Kj=C3=B6rling wrote: >>=20 >>> Hopefully other shells are more sane. >>=20 >> The MacBook here runs GNU bash, version 3.2.57(1)-release >> (x86_64-apple-darwin16) and is equally busted, as is plain "sh" on = both the >> Mac and FreeBSD (I can't be bothered checking the Penguin); I use ZSH = on >> FreeBSD and it does The Right Thing (tm), as does ZSH on the Mac. >>=20 >> -- Dave >=20 > I have tried all the shells I have on my linux box. It turns out that > only ksh and zsh like a ";" at the beginning of the line. Otherwise, > bash, busybox, ash/dash, mksk, posh, and yash can't bear it. >=20 > I really don't see the point of using ";", especially if you need to > make it clear if a command needs to be run by root. >=20 > $ ;-P > sh: 1: Syntax error: ";" unexpected >=20 >=20 > --=20 > [ ~.,_ Enzo Nicosia aka KatolaZ - Devuan -- Freaknet Medialab ] =20 > [ "+. katolaz [at] freaknet.org --- katolaz [at] yahoo.it ] > [ @) http://kalos.mine.nu --- Devuan GNU + Linux User ] > [ @@) http://maths.qmul.ac.uk/~vnicosia -- GPG: 0B5F062F ]=20 > [ (@@@) Twitter: @KatolaZ - skype: katolaz -- github: KatolaZ ] >=20 >=20 >=20 > From: "Steve Johnson" > Subject: Re: [TUHS] TUHS Digest, Vol 33, Issue 5 > Date: 6 August 2018 at 23:19:31 CEST > To: "Hellwig Geisse" , tuhs@minnie.tuhs.org >=20 >=20 > I take a somewhat more relaxed view of what a spec should be: > It should describe a program with enough completeness that a competent > programmer could write it from the spec alone. > Each section of the spec should be capable of being tested. > If all the tests for all the sections pass, then the program is ready > for general use. >=20 > The formal systems I have seen would roll over and die when presented = with > even a simple compiler. Additionally, being able to specify that a = particular > function be carried out by a heapsort, for example, would require that = the > formalism could describe the heapsort and prove it correct. These = don't > grow on trees... >=20 > Steve >=20 >=20 >=20 > ----- Original Message ----- > From: "Hellwig Geisse" > To: > Cc: > Sent:Mon, 06 Aug 2018 18:30:30 +0200 > Subject:Re: [TUHS] TUHS Digest, Vol 33, Issue 5 >=20 >=20 > On Mo, 2018-08-06 at 08:52 -0700, Bakul Shah wrote: > >=20 > > What counts as a "formal spec"? Is it like Justice Potter Stewart's > > "I know it when I see it" definition or something better? > >=20 >=20 > For me, a "formal spec" should serve two goals: > 1) You can reason about the thing that is specified. > 2) The spec can be "executed" (i.e., there is an > interpreting mechanism, which lets the spec behave > like the real thing). >=20 > Hellwig >=20 >=20 >=20 > From: Tony Finch > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 12:45:37 CEST > To: Michael Kj=C3=B6rling > Cc: tuhs@minnie.tuhs.org >=20 >=20 > Michael Kj=C3=B6rling wrote: >>=20 >> I suspect I must stand corrected on this. Turns out that at least GNU >> bash 4.4.12(1) seems to not like a `;` at the beginning of the = command >> line. >=20 > This is a consequence of the POSIX shell grammar, which doesn't allow > empty commands. >=20 > = http://pubs.opengroup.org/onlinepubs/9699919799.2013edition/utilities/V3_c= hap02.html#tag_18_10 >=20 > The prompt I have used since about 1997 (and I can't remember where I = got > it from - somewhere on Usenet, probably) in its most distilled form is >=20 > :; >=20 > although in practice I have a load of extra fluff for username, = hostname, > CWD, etc. usw. >=20 > Tony. > --=20 > f.anthony.n.finch http://dotat.at/ > Fair Isle, Faeroes: South or southwest 4 or 5, occasionally 6 for a = time. > Slight or moderate, occasionally rough for a time. Showers. Moderate = or good. >=20 >=20 >=20 > From: Pete Turnbull > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 13:24:20 CEST > To: tuhs@minnie.tuhs.org >=20 >=20 > On 07/08/2018 09:02, Michael Kj=C3=B6rling wrote: >> On 7 Aug 2018 06:54 +0000, from michael@kjorling.se (Michael = Kj=C3=B6rling): >>> the shell will do The Right Thing (tm) >> I suspect I must stand corrected on this. Turns out that at least GNU >> bash 4.4.12(1) seems to not like a `;` at the beginning of the = command >> line. >> $ /bin/bash --version | head -n1 >> GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu) >> $ /bin/bash >> $ ; true >> bash: syntax error near unexpected token `;' >> $ echo $? >> 2 >> $ >> Hopefully other shells are more sane. >=20 > ksh and sh on an IRIX system don't like it either: >=20 > $ ; > ksh: syntax error: `;' unexpected > $ >=20 > csh and tcsh don't mind. >=20 > Of course it works in rc itself, which is the point, really, and I = wonder how often anyone pasted from one shell into another. All the rc = use I've seen did indeed use "; " as the prompt, but that was all at the = University of York, starting in 1993. >=20 > --=20 > Pete > Pete Turnbull >=20 >=20 >=20 >=20 > From: Doug McIlroy > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 14:34:16 CEST > To: tuhs@tuhs.org >=20 >=20 >> The Bourne shell (V7) had setable PS1 (start of command) and PS2 = (continuation prompts) >=20 > When PS2 came on the scene, Bob Morris noticed that it most often = appeared > because of a missing close quote. Therefore he set PS2=3D"hit = interrupt". >=20 >=20 >=20 >=20 > From: Brian Zick > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 17:15:07 CEST > To: Kurt H Maier > Cc: tuhs@minnie.tuhs.org >=20 >=20 >>> rc uses ; >>=20 >> Does it? 10th edition Unix and Plan 9 rc both have ('% ' ' ') as the = =20 >> default value of $prompt. At least that's how it's described in the >> manual.=20 >=20 > In NetBSD 7 the default is ';', but I don't see any reference to a = default $prompt in the manual on that system. I wonder if this was a = change unique to Berkeley. >=20 > B >=20 >=20 >=20 >=20 > From: "John P. Linderman" > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 17:52:57 CEST > To: Brian Zick > Cc: Kurt H Maier , tuhs@minnie.tuhs.org >=20 >=20 > On vacation, with just an iPad keyboard, so I apologize for not doing = more digging. As I noted, when taking the blame for the Great Echo = Schism, my early exposure to a hp2640 terminal that allowed =E2=80=9Crentr= y=E2=80=9D of a previous command was partly to blame. It also led me to = use a PS1 ending in @, the default line-kill. When I reentered a = command, the @ wiped out the prompt stuff, and only the command = survived.=20 >=20 > On Tue, Aug 7, 2018 at 10:15 AM Brian Zick > wrote: > > > rc uses ; > > =20 > > Does it? 10th edition Unix and Plan 9 rc both have ('% ' ' ') as = the =20 > > default value of $prompt. At least that's how it's described in the > > manual.=20 >=20 > In NetBSD 7 the default is ';', but I don't see any reference to a = default $prompt in the manual on that system. I wonder if this was a = change unique to Berkeley. >=20 > B >=20 >=20 >=20 > From: Lyndon Nerenberg > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 19:35:49 CEST > To: Tony Finch > Cc: Michael Kj=C3=B6rling , tuhs@minnie.tuhs.org >=20 >=20 >> The prompt I have used since about 1997 (and I can't remember where I = got >> it from - somewhere on Usenet, probably) in its most distilled form = is >>=20 >> :; >=20 > I forget where I stole this from. It lives in $home/lib/profile on my = Plan9 machines: >=20 > # /n/sources/contrib/lyndon/prompt.rc > fn : {} > fn setprompt { > prompt =3D (': '^`{cat /dev/user}^@^`{cat = /dev/sysname}^':'^`{pwd}^'; ' ' ') > } > fn cd { builtin cd $* && setprompt } > setprompt >=20 >=20 >=20 >=20 >=20 > From: C=C3=A1g > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 20:09:51 CEST > To: tuhs@minnie.tuhs.org >=20 >=20 > Brian Zick wrote: >=20 >> In NetBSD 7 the default is ';', but I don't see any reference to a >> default $prompt in the manual on that system. >=20 > It's not. '$' is default for sh and ksh, and '%' for csh. I think > it maybe has never been ';'. >=20 > -- > ca=C3=B3c >=20 >=20 >=20 >=20 >=20 > From: arnold@skeeve.com > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 20:51:52 CEST > To: tuhs@minnie.tuhs.org, ca6c@bitmessage.ch >=20 >=20 > C??g wrote: >=20 >> Brian Zick wrote: >>=20 >>> In NetBSD 7 the default is ';', but I don't see any reference to a >>> default $prompt in the manual on that system. >>=20 >> It's not. '$' is default for sh and ksh, and '%' for csh. I think >> it maybe has never been ';'. >>=20 >> -- >> ca??c >>=20 >=20 > Brian was referring to rc(1) in NetBSD. I suspect it's Byron's rc > and I think the default there is ';'. >=20 > Arnold >=20 >=20 >=20 >=20 > From: C=C3=A1g > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 21:00:22 CEST > To: tuhs@minnie.tuhs.org >=20 >=20 > arnold wrote: >=20 >> Brian was referring to rc(1) in NetBSD. I suspect it's Byron's rc >> and I think the default there is ';'. >=20 > rc is not shipped with NetBSD. There's Byron's rc in pkgsrc, so it = could > be that. >=20 > -- > ca=C3=B3c >=20 >=20 >=20 >=20 >=20 > From: Brian Zick > Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > # > Date: 7 August 2018 at 21:06:03 CEST > To: tuhs@minnie.tuhs.org >=20 >=20 > On Tue, Aug 7, 2018, at 8:00 PM, C=C3=A1g wrote: >> arnold wrote: >>=20 >>> Brian was referring to rc(1) in NetBSD. I suspect it's Byron's rc >>> and I think the default there is ';'. >>=20 >> rc is not shipped with NetBSD. There's Byron's rc in pkgsrc, so it = could >> be that. >=20 > Yes, I was referring to the rc in pkgsrc. >=20 > B >=20 >=20 >=20 >=20 >=20 > _______________________________________________ > TUHS mailing list > TUHS@minnie.tuhs.org > https://minnie.tuhs.org/cgi-bin/mailman/listinfo/tuhs --Apple-Mail=_671DFDFE-B9BD-4A37-87A5-907FB3046664 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Decades ago I made my prompt simply end with a newline, which = perfectly and cleanly solves the problem of making it easy to copy and = paste a whole line by multiple clicking in a terminal emulator to select = the line, or by using line oriented commands in an emacs shell (or = moving to the line and hitting return, which Emacs often regularly fucks = up with its idiotic kludges to identify the prompt with invisible marks = and regular expressions), without injecting any garbage characters into = the beginning of the command line or requiring any extra mouse clicks, = precision cursor targeting, or extra keystrokes.

Using =E2=80=9C;=E2=80=9D or any other = character as a prompt is an ugly hack, and doesn=E2=80=99t solve the = problem thoroughly or cleanly. No matter what character you use as a = prompt at the beginning of the line, it=E2=80=99s going to cause some = problems, like semicolons building up each time you re-enter the line, = or conflicts with built-in shell syntax (retch!), so the only logical = (and most obvious) solution is not to use any characters at the = beginning of the line at all, and just put the prompt on a line above on = its own. There is no downside to that, unless it somehow offends your = sense of aesthetics. (In which case you should get over = it.) 

That=E2=80=99s the cleanest solution without any unpleasant = side effects. I don=E2=80=99t understand why that solution isn=E2=80=99t = the first thing shell users think of, and the default used by the shell = =E2=80=94 it=E2=80=99s so obvious. Maybe because people used to the = shell are just so accustomed to having to deal with mashing together = unpleasant hackey kludgy incompatible competing ad-hoc syntax that it = would never occur to them that it=E2=80=99s possible to solve a problem = by REMOVING punctuation and noise characters instead of ADDING more of = them. 

-Don


On 8 Aug = 2018, at 04:00, tuhs-request@minnie.tuhs.org wrote:

Send TUHS mailing = list submissions to
tuhs@minnie.tuhs.org

To = subscribe or unsubscribe via the World Wide Web, visit
= https://minnie.tuhs.org/cgi-bin/mailman/listinfo/tuhs
or, via email, send a message with subject or body 'help' = to
= tuhs-request@minnie.tuhs.org

You can reach the person managing the list at
= tuhs-owner@minnie.tuhs.org

When = replying, please edit your Subject line so it is more specific
than "Re: Contents of TUHS digest..."
Today's = Topics:

  1. Re: Origins of = shell prompt suffixes % $ > # (Michael Kj=C3=B6rling)
=   2. Re: Origins of shell prompt suffixes % $ > # (Kurt H = Maier)
  3. Re: Origins of shell prompt = suffixes % $ > # (arnold@skeeve.com)
  4. = Re: Origins of shell prompt suffixes % $ > # (Bakul Shah)
  5. Re: Origins of shell prompt suffixes % $ > = # (Michael Kj=C3=B6rling)
  6. Re: Origins of = shell prompt suffixes % $ > # (Dave Horsfall)
=   7. Re: Origins of shell prompt suffixes % $ > # = (KatolaZ)
  8. Re: TUHS Digest, Vol 33, Issue 5 = (Steve Johnson)
  9. Re: Origins of shell = prompt suffixes % $ > # (Tony Finch)
 10. Re: = Origins of shell prompt suffixes % $ > # (Pete Turnbull)
=  11. Re: Origins of shell prompt suffixes % $ > # (Doug = McIlroy)
 12. Re: Origins of shell prompt suffixes % = $ > # (Brian Zick)
 13. Re: Origins of shell = prompt suffixes % $ > # (John P. Linderman)
 14. = Re: Origins of shell prompt suffixes % $ > # (Lyndon Nerenberg)
 15. Re: Origins of shell prompt suffixes % $ > # = (C=C3=A1g)
 16. Re: Origins of shell prompt suffixes = % $ > # (arnold@skeeve.com)
 17. Re: Origins of = shell prompt suffixes % $ > # (C=C3=A1g)
 18. Re: = Origins of shell prompt suffixes % $ > # (Brian Zick)
From: Michael Kj=C3=B6rling <michael@kjorling.se>
Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > = #
Date: 7 = August 2018 at 08:54:54 CEST
To: = tuhs@minnie.tuhs.org


On 6 Aug 2018 = 21:53 +0100, from brian@zick.io (Brian Zick):
rc uses ;

Not sure what came first, and not up to digging out the = history books,
but these days, a plain `;` for a prompt = has a distinct advantage in
that you can copy the whole = line and paste it into another shell, and
the shell will = do The Right Thing (tm) as long as (as is, I believe,
done = by all of the major shells at least) it uses `;` for command
separation.

--
Michael Kj=C3=B6rling =E2=80=A2 https://michael.kjorling.se = =E2=80=A2 michael@kjorling.se
 =E2=80=9CThe most = dangerous thought that you can have as a creative person
=             &n= bsp;is to think you know what you=E2=80=99re doing.=E2=80=9D (Bret = Victor)




From: Kurt H Maier <khm@sciops.net>
Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > = #
Date: 7 = August 2018 at 09:31:36 CEST
To: = Brian Zick = <brian@zick.io>
Cc: tuhs@minnie.tuhs.org


On Mon, Aug 06, 2018 at 09:53:33PM +0100, = Brian Zick wrote:

rc uses ;

Does it? =  10th edition Unix and Plan 9 rc both have ('% ' ' ') as the =   
default value of $prompt.  At least = that's how it's described in the
manual.  None of the = v8/9/10 tarballs in the archive contain rc code,
but some = contain manual source, and those describe % prompts.

I've seen other references to ; (presumably  ('; ' ' ')) = as the rc
prompt but I've never seen it in the wild. =  Does anyone here know what
the story is?

khm




From: arnold@skeeve.com
Subject: = Re: [TUHS] = Origins of shell prompt suffixes % $ > #
Date: 7 = August 2018 at 09:50:21 CEST
To: = khm@sciops.net, = brian@zick.io
Cc: = tuhs@minnie.tuhs.org


Kurt H Maier = <khm@sciops.net> wrote:

On Mon, Aug 06, 2018 at 09:53:33PM +0100, Brian = Zick wrote:

rc uses ;

Does it? =  10th edition Unix and Plan 9 rc both have ('% ' ' ') as the =   
default value of $prompt.  At least = that's how it's described in the
manual.  None of the = v8/9/10 tarballs in the archive contain rc code,
but some = contain manual source, and those describe % prompts.

I've seen other references to ; (presumably  ('; ' ' ')) = as the rc
prompt but I've never seen it in the wild. =  Does anyone here know what
the story is?

khm

I = believe that Tom Duff's rc does indeed use ('% ' ' '). But I think = that
Byron Rakitsis's version changed the default to ('; ' = ' ') exactly for
the reason that it's = copyable/pastable.

HTH,

Arnold




From: Bakul Shah <bakul@bitblocks.com>
Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > = #
Date: 7 = August 2018 at 09:57:11 CEST
To: = Kurt H Maier = <khm@sciops.net>
Cc: = Brian Zick = <brian@zick.io>, tuhs@minnie.tuhs.org

On Tue, 07 Aug 2018 00:31:36 -0700 Kurt H = Maier <khm@sciops.net> wrote:
On Mon, Aug 06, 2018 at 09:53:33PM +0100, Brian = Zick wrote:

rc uses ;

Does it? =  10th edition Unix and Plan 9 rc both have ('% ' ' ') as the =   
default value of $prompt.  At least = that's how it's described in the
manual.  None of the = v8/9/10 tarballs in the archive contain rc code,
but some = contain manual source, and those describe % prompts.

I've seen other references to ; (presumably  ('; ' ' ')) = as the rc
prompt but I've never seen it in the wild. =  Does anyone here know what
the story is?

The es shell (by Haar and = Rakitzis) used ; - the reason (as
per the man page)is that = a user can cut-n-paste a previous
line to rexecute it (for = the same reason people use term% and
cpu% functions to = execute their args).  Es syntax was derived
from rc, = which may be why the confusion.




From: Michael Kj=C3=B6rling <michael@kjorling.se>
Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > = #
Date: 7 = August 2018 at 10:02:56 CEST
To: = tuhs@minnie.tuhs.org


On 7 Aug 2018 = 06:54 +0000, from michael@kjorling.se (Michael Kj=C3=B6rling):
the shell will do The = Right Thing (tm)

I suspect I = must stand corrected on this. Turns out that at least GNU
bash 4.4.12(1) seems to not like a `;` at the beginning of = the command
line.

=    $ /bin/bash --version | head -n1
=    GNU bash, version 4.4.12(1)-release = (x86_64-pc-linux-gnu)
   $ /bin/bash
   $ ; true
=    bash: syntax error near unexpected token `;'
   $ echo $?
=    2
   $

Hopefully other shells are more sane.

--
Michael Kj=C3=B6rling =E2=80=A2 = https://michael.kjorling.se =E2=80=A2 michael@kjorling.se
=  =E2=80=9CThe most dangerous thought that you can have as a = creative person
=             &n= bsp;is to think you know what you=E2=80=99re doing.=E2=80=9D (Bret = Victor)




From: Dave Horsfall <dave@horsfall.org>
Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > = #
Date: 7 = August 2018 at 10:23:37 CEST
To: = The Eunuchs Hysterical Society = <tuhs@tuhs.org>


On Tue, 7 Aug 2018, Michael Kj=C3=B6rling wrote:

Hopefully = other shells are more sane.

The = MacBook here runs GNU bash, version 3.2.57(1)-release = (x86_64-apple-darwin16) and is equally busted, as is plain "sh" on both = the Mac and FreeBSD (I can't be bothered checking the Penguin); I use = ZSH on FreeBSD and it does The Right Thing (tm), as does ZSH on the = Mac.

-- Dave

From: KatolaZ <katolaz@freaknet.org>
Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > = #
Date: 7 = August 2018 at 10:37:23 CEST
To: = tuhs@minnie.tuhs.org


On Tue, Aug 07, = 2018 at 06:23:37PM +1000, Dave Horsfall wrote:
On Tue, 7 Aug 2018, Michael Kj=C3=B6rling = wrote:

Hopefully other shells are more sane.

The MacBook here runs GNU bash, = version 3.2.57(1)-release
(x86_64-apple-darwin16) and is = equally busted, as is plain "sh" on both the
Mac and = FreeBSD (I can't be bothered checking the Penguin); I use ZSH on
FreeBSD and it does The Right Thing (tm), as does ZSH on the = Mac.

-- Dave

I have tried all the shells I have on my linux box. It turns = out that
only ksh and zsh like a ";" at the beginning of = the line. Otherwise,
bash, busybox, ash/dash, mksk, posh, = and yash can't bear it.

I really don't see = the point of using ";", especially if you need to
make it = clear if a command needs to be run by root.

$= ;-P
sh: 1: Syntax error: ";" unexpected


--
[ ~.,_  Enzo Nicosia = aka KatolaZ - Devuan -- Freaknet Medialab  ]  
[ =     "+.  katolaz [at] freaknet.org --- katolaz = [at] yahoo.it  ]
[ =       @)   http://kalos.mine.nu = ---  Devuan GNU + Linux User  ]
[ =     @@)  http://maths.qmul.ac.uk/~vnicosia -- =  GPG: 0B5F062F  ]
[ (@@@)  Twitter: = @KatolaZ - skype: katolaz -- github: KatolaZ  ]



From: "Steve Johnson" <scj@yaccman.com>
Subject: Re: [TUHS] TUHS Digest, Vol 33, Issue 5
Date: 6 = August 2018 at 23:19:31 CEST
To: = "Hellwig Geisse" = <hellwig.geisse@mni.thm.de>, tuhs@minnie.tuhs.org


I take a somewhat more relaxed view of what a = spec should be:
It should describe a program with = enough completeness that a competent
programmer = could write it from the spec alone.
Each section of = the spec should be capable of being tested.
If all = the tests for all the sections pass, then the program is ready
for general use.

The formal systems I have seen would roll over and die when = presented with
even a simple compiler.  = Additionally, being able to specify that a particular
function be carried out by a heapsort, for example, would = require that the
formalism could describe the = heapsort and prove it correct.  These don't
grow= on trees...

Steve



----- = Original Message -----
From:
"Hellwig Geisse" = <hellwig.geisse@mni.thm.de>

To:
<tuhs@minnie.tuhs.org>
Cc:

Sent:
Mon, 06 Aug 2018 18:30:30 +0200
Subject:
Re: = [TUHS] TUHS Digest, Vol 33, Issue 5


On Mo, 2018-08-06 at 08:52 -0700, Bakul Shah wrote:
>
> What counts as a "formal spec"? Is it like Justice Potter = Stewart's
> "I know it when I see it" definition or something better?
>

For me, a "formal spec" should serve two goals:
1) You can reason about the thing that is specified.
2) The spec can be "executed" (i.e., there is an
   interpreting mechanism, which lets the spec behave
   like the real thing).

Hellwig



From: Tony Finch <dot@dotat.at>
Subject: = Re: [TUHS] = Origins of shell prompt suffixes % $ > #
Date: 7 = August 2018 at 12:45:37 CEST
To: = Michael Kj=C3=B6rling = <michael@kjorling.se>
Cc: = tuhs@minnie.tuhs.org


Michael Kj=C3=B6rlin= g <michael@kjorling.se> wrote:

I suspect I must stand corrected = on this. Turns out that at least GNU
bash 4.4.12(1) seems = to not like a `;` at the beginning of the command
line.

This is a consequence of the = POSIX shell grammar, which doesn't allow
empty = commands.

http://pubs.opengroup.org/onlinepubs/9699919799.2013edition/uti= lities/V3_chap02.html#tag_18_10

The prompt = I have used since about 1997 (and I can't remember where I got
it from - somewhere on Usenet, probably) in its most = distilled form is

:;

although in practice I have a load of extra fluff for = username, hostname,
CWD, etc. usw.

Tony.
--
f.anthony.n.finch =  <dot@dotat.at>  http://dotat.at/
Fair = Isle, Faeroes: South or southwest 4 or 5, occasionally 6 for a time.
Slight or moderate, occasionally rough for a time. Showers. = Moderate or good.



From: Pete Turnbull <pete@dunnington.plus.com>
Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > = #
Date: 7 = August 2018 at 13:24:20 CEST
To: = tuhs@minnie.tuhs.org


On 07/08/2018 = 09:02, Michael Kj=C3=B6rling wrote:
On 7 Aug 2018 06:54 +0000, from = michael@kjorling.se (Michael Kj=C3=B6rling):
the shell will do The Right Thing (tm)
I suspect I must stand corrected on this. Turns = out that at least GNU
bash 4.4.12(1) seems to not like a = `;` at the beginning of the command
line.
=     $ /bin/bash --version | head -n1
=     GNU bash, version 4.4.12(1)-release = (x86_64-pc-linux-gnu)
    $ = /bin/bash
    $ ; true
=     bash: syntax error near unexpected token `;'
    $ echo $?
=     2
    $
Hopefully other shells are more sane.

ksh and sh on an IRIX system = don't like it either:

$ ;
ksh: = syntax error: `;' unexpected
$

csh and tcsh don't mind.

Of = course it works in rc itself, which is the point, really, and I wonder = how often anyone pasted from one shell into another.  All the rc = use I've seen did indeed use "; " as the prompt, but that was all at the = University of York, starting in 1993.

-- =
Pete
Pete Turnbull




From: = Doug McIlroy = <doug@cs.dartmouth.edu>
Subject: = Re: [TUHS] = Origins of shell prompt suffixes % $ > #
Date: 7 = August 2018 at 14:34:16 CEST
To: = tuhs@tuhs.org


The Bourne shell (V7) had setable PS1 (start of = command) and PS2 (continuation prompts)

When PS2 came on the scene, Bob Morris noticed that it most = often appeared
because of a missing close quote. Therefore = he set PS2=3D"hit interrupt".




From: Brian Zick <brian@zick.io>
Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > = #
Date: 7 = August 2018 at 17:15:07 CEST
To: = Kurt H Maier = <khm@sciops.net>
Cc: = tuhs@minnie.tuhs.org


rc uses = ;

Does it?  10th edition = Unix and Plan 9 rc both have ('% ' ' ') as the   
default value of $prompt.  At least that's how it's = described in the
manual.

In NetBSD 7 the default is ';', but I don't see any reference = to a default $prompt in the manual on that system. I wonder if this was = a change unique to Berkeley.

B




From: "John P. Linderman" <jpl.jpl@gmail.com>
Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > = #
Date: 7 = August 2018 at 17:52:57 CEST
To: = Brian Zick = <brian@zick.io>
Cc: Kurt H Maier <khm@sciops.net>, tuhs@minnie.tuhs.org


On vacation, with just an iPad keyboard, so I = apologize for not doing more digging.  As I noted, when taking the = blame for the Great Echo Schism, my early exposure to a hp2640 terminal = that allowed =E2=80=9Crentry=E2=80=9D of a previous command was partly = to blame. It also led me to use a PS1 ending in @, the default = line-kill. When I reentered a command, the @ wiped out the prompt stuff, = and only the command survived. 

On = Tue, Aug 7, 2018 at 10:15 AM Brian Zick <brian@zick.io> wrote:
> > rc uses ;
>       
> Does it?  10th edition Unix and Plan 9 rc both have ('% ' ' ') = as the   
> default value of $prompt.  At least that's how it's described = in the
> manual.

In NetBSD 7 the default is ';', but I don't see any reference to a = default $prompt in the manual on that system. I wonder if this was a = change unique to Berkeley.

B



From: Lyndon Nerenberg <lyndon@orthanc.ca>
Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > = #
Date: 7 = August 2018 at 19:35:49 CEST
To: = Tony Finch = <dot@dotat.at>
Cc: Michael Kj=C3=B6rling <michael@kjorling.se>, = tuhs@minnie.tuhs.org


The prompt I have used = since about 1997 (and I can't remember where I got
it from = - somewhere on Usenet, probably) in its most distilled form is

:;

I = forget where I stole this from. It lives in $home/lib/profile on my = Plan9 machines:

# = /n/sources/contrib/lyndon/prompt.rc
fn : {}
fn= setprompt {
=        prompt =3D (': '^`{cat = /dev/user}^@^`{cat /dev/sysname}^':'^`{pwd}^'; '  ' =        ')
}
fn cd { builtin cd $* && setprompt }
setprompt





From: C=C3=A1g <ca6c@bitmessage.ch>
Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > = #
Date: 7 = August 2018 at 20:09:51 CEST
To: = tuhs@minnie.tuhs.org


Brian Zick = wrote:

In NetBSD 7 the default is ';', but I don't see any reference = to a
default $prompt in the manual on that system.

It's not. '$' is default for sh = and ksh, and '%' for csh. I think
it maybe has never been = ';'.

--
ca=C3=B3c




From: arnold@skeeve.com
Subject: = Re: [TUHS] = Origins of shell prompt suffixes % $ > #
Date: 7 = August 2018 at 20:51:52 CEST
To: = tuhs@minnie.tuhs.org, = ca6c@bitmessage.ch


C??g <ca6c@bitmessage.ch> wrote:

Brian Zick wrote:

In NetBSD = 7 the default is ';', but I don't see any reference to a
default $prompt in the manual on that system.

It's not. '$' is default for sh = and ksh, and '%' for csh. I think
it maybe has never been = ';'.

--
ca??c

Brian was referring to rc(1) in = NetBSD.  I suspect it's Byron's rc
and I think the = default there is ';'.

Arnold




From: C=C3=A1g <ca6c@bitmessage.ch>
Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > = #
Date: 7 = August 2018 at 21:00:22 CEST
To: = tuhs@minnie.tuhs.org


arnold wrote:

Brian was = referring to rc(1) in NetBSD.  I suspect it's Byron's rc
and I think the default there is ';'.

rc is not shipped with NetBSD. = There's Byron's rc in pkgsrc, so it could
be that.

--
ca=C3=B3c





From: Brian Zick <brian@zick.io>
Subject: Re: [TUHS] Origins of shell prompt suffixes % $ > = #
Date: 7 = August 2018 at 21:06:03 CEST
To: = tuhs@minnie.tuhs.org


On Tue, Aug 7, = 2018, at 8:00 PM, C=C3=A1g wrote:
arnold wrote:

Brian was referring to rc(1) in NetBSD.  I = suspect it's Byron's rc
and I think the default there is = ';'.

rc is not shipped with = NetBSD. There's Byron's rc in pkgsrc, so it could
be = that.

Yes, I was referring to = the rc in pkgsrc.

B





_______________________________________________
TUHS mailing list
TUHS@minnie.tuhs.org
https://minnie.tuhs.org/cgi-bin/mailman/listinfo/tuhs
= --Apple-Mail=_671DFDFE-B9BD-4A37-87A5-907FB3046664--