Improved shell prompt

Started by doktornotor, December 12, 2023, 10:58:45 AM

Previous topic - Next topic
December 12, 2023, 10:58:45 AM Last Edit: December 12, 2023, 11:01:43 AM by doktornotor
Just putting a note here for myself, might be useful for others. Mainly wanted FQDN included, the hostname alone is not really useful when you have tons of boxes which happen to have e.g. gw as hostname.

Use this in ~/.cshrc (comment out the original line) to get [OPNsense version][username@FQDN]/$cwd #

set prompt="[%B`opnsense-version`%b][%B%n%b%{\033[0;1;31m%}@%{\033[0;0;0m%}%B%M%b]%/%{\033[0;1;31m%} #%{\033[0;0;0m%} "


Result:

[OPNsense 23.7.9][root@host.example.com]/root #