Last active
August 8, 2019 20:34
-
-
Save Mr-Slippery/0e5ddbcb9cb294025f42e64de157032e to your computer and use it in GitHub Desktop.
"If you could ... that would be greeaat" prompt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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