My terminal shell prompt defaults to [johnnine@tec ~]$
.
How should I use "set prompt" in ~/.cshrc
, so that it also displays time?
You now presumably have : set prompt="[%n@%M %~]$ "
.
You can change it to anything you fancy adding/inserting %p
for time in 12 hour format or %P
for the same in 24-hour format.
Place this in you ~/.cshrc
file and after each modification, source the file to enable the tentative changes and see if the results is what you expect. To source just enter $ source ~/.cshrc
in terminal.
prompt
section. – Cbhihe Sep 18 '21 at 14:53