[TUHS] What's In a Prompt String?

Lyndon Nerenberg (VE7TFX/VE6BBM) via TUHS tuhs at tuhs.org
Wed Apr 29 07:14:42 AEST 2026


For Plan 9's rc(1), on 4th edition (the Bell Labs version), the
prompt was either 'term% ' or 'cpu% ', depending on which version
of the kernel you were running.  I forget now what the Labs pre-v4
systems did.

9front changed the prompt to 'hostname% ' pretty early on. ('hostname'
was set to the value in /dev/hostname.)  Makes it easier to track
which host you are cpu'd into.

Either way, once the prompt is set (e.g. foo%). a function of the
same name is defined as a noop, allowing you to snarf-n-barf
blocks of commands from the terminal buffer with the prompt
becoming invisible to the shell.

I did the equivalent by wrapping my prompt between ':' and ';'.
E.g.

	: lyndon at gamma:/usr/lyndon;

This let me achive the same snarf-n-barfablilty without having to
create and delete noop functions every time I changed the directory.
(I've been doing this on Unix for ages, too.)

--lyndon


More information about the TUHS mailing list