Skip to content

Instantly share code, notes, and snippets.

@Postrediori
Last active March 19, 2023 19:48
Show Gist options
  • Save Postrediori/c435be75090c0ac01b204cd5b0b4a31e to your computer and use it in GitHub Desktop.
Save Postrediori/c435be75090c0ac01b204cd5b0b4a31e to your computer and use it in GitHub Desktop.
Various shell-related info

Bash HowTos

Mutiline prompt

PS1='\[\e[36;1m\]+----\[\e[0m\]\[\e[36m\]\[\e[30;1m\][\[\e[0m\]\$
\[\e[32;1m\]\w\[\e[0m\]\[\e[30;1m\]]\[\e[0m\]\n\$
\[\e[36;1m\]+--\[\e[0m\]\[\e[36m\]\[\e[0m\]\$
\[\e[37;1m\]\$\[\e[0m\] '

Displayed result:

+----[~]
+--$ 

Multiline prompt with box-drawing characters:

export PS1='\[\e[36;1m\]\[\e(0\]lqqqq\[\e(B\]\[\e[0m\]\[\e[36m\]\[\e[30;1m\][\[\e[0m\]\
\[\e[32;1m\]\w\[\e[0m\]\[\e[30;1m\]]\[\e[0m\]\n\
\[\e[36;1m\]\[\e(0\]mqq\[\e(B\]\[\e[0m\]\[\e[36m\]\[\e[0m\]\
\[\e[37;1m\]\$\[\e[0m\] '

Displayed result:

┌────[~]
└──$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment