Last active
April 21, 2020 18:02
-
-
Save kbens/5ffddc8420ee1982b992a004235c6d72 to your computer and use it in GitHub Desktop.
Example of adding Oracle Cloud Shell specific setup to custom bashrc file
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
# ... | |
# if $OCI_CLI_CONFIG_FILE is set, assume called from Oracle Cloud Shell | |
if [ -n $OCI_CLI_CONFIG_FILE ] then | |
# set my timezone | |
export TZ="/usr/share/zoneinfo/America/Chicago" | |
# set custom prompt | |
export PS1='\[\033[90m\]┌[\[\033[37m\]\t\[\033[90m\]]-[\[\033[32m\]\u\[\033[90m\] at ☁️ ]-[\[\033[35m\]$OCI_CLI_PROFILE\[\033[90m\]]\n└[\[\033[34m\]\w\[\033[90m\]]\[\033[36m\]$(__git_ps1 " [%s]") \[\033[37m\]$ ' | |
# call delivered cloud shel bashrc | |
source /etc/bashrc.cloudshell | |
fi | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Need to find a better way to check if Oracle Cloud Shell or not...