I’m looking for inspiration for a custom Bash prompt[1]. I’d love to see yours! 😊 If possible, include both the prompt’s PS1
, and a screenshot/example of what it looks like.
References
- Type: Documentation. Title: “Bash Reference Manual”. Publisher: Gnu Project. Edition: 5.2. Published: 2022-09-19. Accessed: 2025-03-21T02:46Z. URI: https://www.gnu.org/software/bash/manual/html_node/index.html.
- §6.9 “Controlling the Prompt”. URI: https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html.
Crossposts:
export PS1="\[\e[31m\][\[\e[m\]\[\e[38;5;172m\]\u\[\e[m\]@\[\e[38;5;153m\]\h\[\e[m\] \[\e[38;5;214m\]\W\[\e[m\]\[\e[31m\]]\[\e[m\]\\$ "
That’s a warcrime.
How so? What does this do?
Best I can tell is it’s a normal `username@hostname current_directory$ sorta prompt with some coloring: • Red for the square brackets • Orange (color 172) for the username • Light blue (color 153) for the hostname • Amber (color 214) for the current working directory
Other than being hard to read from the embedded coloring I’m not sure why this is a war crime.