$ open -e .bash_profile
If this is the first time you’re editing this file, it should be empty. Add this line to the file and save.
$ export PS1="\u$ "
Options for customising the prompt
Here are a few common flags you can use to customize your Terminal prompt:
\d
– Current date\t
– Current time\h
– Host name\#
– Command number\u
– User name\W
– Current working directory (ie: Desktop/)\w
– Current working directory with full path (ie: /Users/Admin/Desktop/)
https://medium.com/@ajaykarwal/edit-the-terminal-prompt-name-on-macos-4d80163be6a1
Add colors:https://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/
Add bold font: Bold is set by
01
so you need to add 01;
before each color specification:
No comments:
Post a Comment