Computer Old Farts Forum
 help / color / mirror / Atom feed
From: Steffen Nurpmeso <steffen@sdaoden.eu>
To: Grant Taylor <gtaylor@tnetconsulting.net>
Cc: coff@minnie.tuhs.org
Subject: Re: [COFF] What is your prompt?
Date: Sat, 25 Dec 2021 20:14:37 +0100	[thread overview]
Message-ID: <20211225191437.bKBLU%steffen@sdaoden.eu> (raw)
In-Reply-To: <517271a2-c18c-f6b2-e5a8-0f93b2accba7@spamtrap.tnetconsulting.net>

Grant Taylor wrote in
 <517271a2-c18c-f6b2-e5a8-0f93b2accba7@spamtrap.tnetconsulting.net>:
 |On 12/25/21 10:39 AM, Steffen Nurpmeso wrote:
 |> I might be the only living one who has the expansion of $? in $PS1.
 |
 |It's not $PS1, but I do have $? in my Zsh $RPROMPT.
 |
 |I used to have $? in $PS1 before switching to $RPROMPT.
 |
 |> (And who's "~/.shrc" gives a _somewhat_ portable PS1 with
 |> last-component-of HOSTNAME and PWD.)
 |
 |I'd like to know more.
 |
 |I don't know if it's a good thing or not, but portability across 
 |platforms (OSs / architectures) is much less of an issue for me than it 
 |was in my last job.  Now I mostly worry about Linux and FreeBSD. 
 |Admittedly, some really old versions.

Sure.  Oh the compatibility of shells i meant, of course.  But
that mostly colours, now that ~/.profile ensures HOSTNAME and
LOGNAME per se.  No more \XY escapes here, except \e and the
\[..\] that some need (to get it column counting right, with
colours) (SHTYPE=bash and =yash).

And the "set -o" you need/can to get where you want to be, ksh for
example braceexpand, emacs-usemeta (if possible), expand_aliases
(bash), cdprint/emacs/tabcomplete (NetBSD ksh).

It is of course all a bitrot-affine compatibility mess.  You look
for $0, sometimes deeper for some *_VERSION, for $OSTYPE (which my
~/.profile sets, too).  But in the end it is all a mess.  If
i recall correctly i once proposed a standardized VERSION or xy
thing so that one could easily identify, even in subshells.  But
that would affect future shells only, anyhow.  At one time i have
thrown away a lot of tests, since fish and some other shells
i will never use no more, what remains is just enough to start
working the best i can with dash, bash, ksh.  Last change on PS1
in March 2018, i usually only have one account per $HOSTNAME.
Pretty bitter is shells without aliases, where the a-lia-ses have
to be created as sh_ell_functions.  And then one says builtin, the
other says built-in.

Yeah i mean computing would be nice, if there would not be those
uncountable quirks you need in real life.  The maintainer of
libinput has written a short down-to-earth article on that a few
years ago.

That reminds me of my bitter gut feeling that something bad will
happen, all these days, but luckily the rocket that carried some
real penis lifted successfully.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
_______________________________________________
COFF mailing list
COFF@minnie.tuhs.org
https://minnie.tuhs.org/cgi-bin/mailman/listinfo/coff

  reply	other threads:[~2021-12-25 19:14 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-25  2:50 Rudi Blom
2021-12-25  4:40 ` Theodore Ts'o
2021-12-25 17:39   ` Steffen Nurpmeso
2021-12-25 18:28     ` Grant Taylor via COFF
2021-12-25 19:14       ` Steffen Nurpmeso [this message]
2021-12-26  3:44         ` Grant Taylor via COFF
2021-12-25 23:19   ` Greg 'groggy' Lehey
2021-12-25 23:43     ` Steffen Nurpmeso
2021-12-26 21:18       ` Theodore Ts'o
2021-12-26 21:33         ` Warner Losh
2021-12-27  1:33           ` Theodore Ts'o
2021-12-27  2:52             ` Rudi Blom
2021-12-27  3:43               ` Greg 'groggy' Lehey
2021-12-27  4:06                 ` Rudi Blom
2021-12-27  4:12                   ` Greg 'groggy' Lehey
2021-12-27  4:28                     ` Rudi Blom
2021-12-27 18:44           ` Steffen Nurpmeso
2021-12-27 18:55             ` Warner Losh
2021-12-27 19:07               ` Grant Taylor via COFF
2021-12-27 19:25               ` Steffen Nurpmeso
2021-12-27 18:37         ` Steffen Nurpmeso
2021-12-26  3:29     ` Grant Taylor via COFF
2021-12-26  3:54       ` Greg 'groggy' Lehey
2021-12-26  5:27         ` Grant Taylor via COFF
  -- strict thread matches above, loose matches on Subject: below --
2021-12-23  6:59 [COFF] What is your prompt? (was: ksh88 source code?) Andy Kosela
2021-12-24 17:17 ` [COFF] What is your prompt? Grant Taylor via COFF
2021-12-26 22:17   ` Mike Markowski

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=20211225191437.bKBLU%steffen@sdaoden.eu \
    --to=steffen@sdaoden.eu \
    --cc=coff@minnie.tuhs.org \
    --cc=gtaylor@tnetconsulting.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).