Date: Fri, 3 Jul 2015 23:37:17 -0600 From: Mike Brown <mike@skew.org> To: freebsd-doc@freebsd.org Subject: sh(1) man page suggestion: prompt string syntax Message-ID: <20150704053717.GA21782@chilled.skew.org>
next in thread | raw e-mail | index | archive | help
I was having trouble finding out what escape codes are valid in an sh(1) prompt. The man page does not say, so I looked at /usr/src/bin/sh/parser.c and determined what the options are. Please consider adding this info to the man page, /usr/src/bin/sh/sh.1 : A prompt string must be less than 128 characters. All characters are output verbatim, except these sequences: '$' is replaced with '#' if the user is root. '\h' is replaced with the local hostname. '\H' is replaced with the fully-qualified hostname. '\W' is replaced with the working directory. '\w' is replaced with the full path of the working directory.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150704053717.GA21782>