Last active
September 13, 2023 13:59
-
-
Save johrstrom/03498e9599dbcfc39b2005e5a02c3e50 to your computer and use it in GitHub Desktop.
OSC starter bashrc
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
# .bashrc | |
function source_if_exists() { | |
if [ -f $1 ]; then | |
. $1 | |
fi | |
} | |
function git_branch(){ | |
git rev-parse --abbrev-ref HEAD 2> /dev/null | |
} | |
module load ruby/3.0.2 sqlite git nodejs 2>/dev/null | |
# Source global definitions | |
source_if_exists /etc/bashrc | |
# source my own files | |
source_if_exists "$HOME/.bash_aliases" | |
export PS1="\[\033[0;36m\][\W(\$(git_branch))] \[\e[0m\] " | |
export GEM_HOME="$HOME/.gem" | |
export PATH="$PATH:$GEM_HOME/bin" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment