I often want to fiddle with the bash prompt, but don’t want to deal with bash prompt escape sequences. I wish for a utility which simplify setting a bash prompt. I finally wrote that utility myself: mkprompt
Copy mkprompt to a directory in the path.
The best way to show mkprompt usage is via a couple of examples.
PS1=$(mkprompt "red workdir" space dollar) PS1=$(mkprompt "cyan Workdir" space "green dollar") mkprompt # display help
For more information, see my shell_tools page.
The following are improvements which I plan for mkprompt, depends on my free time:
- Implement the rest of the prompt escape sequences
- Improve the help output
- Implement installation script
I current host my script as part of my shell_tools collection on GitHub.