Customize Bash Prompt String
- Install sexy-bash-prompt
- Modifying the prompt symbol ('PROMPT_SYMBOL') in ~/.bash_prompt
In Bash 4.2+, add the following line at the beginning.
PROMPT_SYMBOL=$'\u21AA'
In Bash 4.1 or earlier, add the following line at the beginning.
PROMPT_SYMBOL=$'\xe2\x86\xaa'
- Then source ~/.bash_prompt
- UTF8 code for additional symbols may be found at UTF-8 Arrows
- Assigning UTF8 code to variables was demonstrated in Awesome symbols and characters in a bash prompt
- Hex code for UTF8 symbols can be found through echo ↪ | hexdump -C, for example.
No comments:
Post a Comment