Skip to content

Instantly share code, notes, and snippets.

@nownabe
Last active May 30, 2022 01:28
Show Gist options
  • Save nownabe/439935d1ebdcb2cf38b811eb3176a3c9 to your computer and use it in GitHub Desktop.
Save nownabe/439935d1ebdcb2cf38b811eb3176a3c9 to your computer and use it in GitHub Desktop.
Prettify Cloud Shell Prompt
PS1='\n'
PS1=$PS1'\[\e[1;33m\]$([[ -n $DEVSHELL_PROJECT_ID ]] && printf "\[\e[1;33m\]$DEVSHELL_PROJECT_ID" || printf "\[\e[1;37m\]cloudshell")\[\e[m\]'
PS1=$PS1':'
PS1=$PS1'\[\e[1;34m\]\w\n\[\e[1;35m\]❯\[\e[m\] '
PS1=$PS1'\[\033k$([[ -n $DEVSHELL_PROJECT_ID ]] && printf "($DEVSHELL_PROJECT_ID)" || printf "cloudshell")\033\\\]'
@nownabe
Copy link
Author

nownabe commented May 30, 2022

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment