Created
September 28, 2017 08:15
-
-
Save shammelburg/761126d87602a3065bed1a975d5aa15b to your computer and use it in GitHub Desktop.
Bash Commands
This file contains hidden or 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
// load bash profile with permission | |
// write your lines and crtl+o to write - ctrl+x to exit | |
sudo nano ~/.bash_profile | |
// if bash profile does not exist | |
touch ~/.bash_profile | |
// refresh bash profile after adding alias, etc. | |
source ~/.bash_profile | |
// add alias | |
alias <alias_name>='your command line' | |
// git branch support | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment