←back to thread

217 points tanelpoder | 1 comments | | HN request time: 0.231s | source
Show context
enriquto ◴[] No.26493019[source]
The classic copy-pasteable prompt (for true graybeards) is simply

        PS1='; '
If you want some more information, the trick is this:

        PS1=': stuff ; '
where "stuff" is whatever string you want to show (without redirection characters). This works because the colon is the "true" executable that ignores all its arguments, and the semicolon introduces your command that can thus be pasted along the whole line.
replies(3): >>26493124 #>>26493993 #>>26496935 #
erlkonig ◴[] No.26493993[source]
The ";" prompt was specific the "es" and "rc" shells, and not really used with any other more common ones, so most graybeards wouldn't have used that as PS1. Also, to be a graybeard and have copy/paste, you're talking about a very expensive computer with a mouse, like a Sun workstation. And all of those csh users from the late 1980s couldn't have, since it would cause a syntax error :-)
replies(2): >>26494362 #>>26494453 #
1. gumby ◴[] No.26494362[source]
I don't have a beard but I did use c shell from about 1980-1988 when I realized I was an idiot.