0

My terminal shell prompt defaults to [johnnine@tec ~]$.

How should I use "set prompt" in ~/.cshrc, so that it also displays time?

Cbhihe
  • 2,701

1 Answers1

1

You now presumably have : set prompt="[%n@%M %~]$ ".

You can change it to anything you fancy adding/inserting %pfor 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.

Cbhihe
  • 2,701