Skip to content

Instantly share code, notes, and snippets.

@openly-retro
Created July 11, 2024 04:09
Show Gist options
  • Select an option

  • Save openly-retro/267cdf5eeb72ed8b6fe9d4fac3ff0ff5 to your computer and use it in GitHub Desktop.

Select an option

Save openly-retro/267cdf5eeb72ed8b6fe9d4fac3ff0ff5 to your computer and use it in GitHub Desktop.
Customized Bash prompt, promoting directory on first line, time and branch on second
# append below to ~/.bashrc
PROMPT_COMMAND='PS1_CMD1=$(git branch --show-current 2>/dev/null)'; PS1='\[\e[38;5;143m\]\d\[\e[0m\] (\[\e[38;5;115m\]\u\[\e[0m\]) \[\e[38;5;36m\]\w\[\e[0m\] \n\t \[\e[38;5;211m\]${PS1_CMD1}\[\e[0m\]> '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment