Skip to content

Instantly share code, notes, and snippets.

@kbens
Last active April 21, 2020 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kbens/5ffddc8420ee1982b992a004235c6d72 to your computer and use it in GitHub Desktop.
Save kbens/5ffddc8420ee1982b992a004235c6d72 to your computer and use it in GitHub Desktop.
Example of adding Oracle Cloud Shell specific setup to custom bashrc file
# ...
# 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
# ...
@kbens
Copy link
Author

kbens commented Apr 21, 2020

Need to find a better way to check if Oracle Cloud Shell or not...

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