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.

_______________________________________________
freebsd-doc@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-doc
To unsubscribe, send any mail to "freebsd-doc-unsubscr...@freebsd.org"

Reply via email to