Skip to content

Instantly share code, notes, and snippets.

@Mr-Slippery
Last active August 8, 2019 20:34
Show Gist options
  • Save Mr-Slippery/0e5ddbcb9cb294025f42e64de157032e to your computer and use it in GitHub Desktop.
Save Mr-Slippery/0e5ddbcb9cb294025f42e64de157032e to your computer and use it in GitHub Desktop.
"If you could ... that would be greeaat" prompt
# Shamelessly based on:
# https://stackoverflow.com/questions/39305476/bash-prompt-with-background-color-extending-to-end-of-line
FIRST_YOU_COULD=1
PROMPT_COMMAND=__prompt_command
__prompt_command()
{
local None='\[\e[0m\]'
local Green='\[\033[1;38;5;10m\]'
local LightPurple='\[\033[1;35m\]'
local BlinkinPurple='\[\033[58;5;253;1;38;5;93m\]'
if [[ "$FIRST_YOU_COULD" = 1 ]]
then
PS1="${Green}If you could${None} "
FIRST_YOU_COULD=0
else
PS1="\n${LightPurple}that would be ${BlinkinPurple}greeaat.\033[K${None}\n\n${Green}If you could${None} "
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment