Last active
May 27, 2020 11:38
-
-
Save zaps166/099af67a6f0047e557c4ca431f55cd22 to your computer and use it in GitHub Desktop.
Revisions
-
zaps166 revised this gist
Feb 18, 2018 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,13 @@ getGitInfo() { checksum=$(git rev-parse --short HEAD 2> /dev/null) branch=$(git symbolic-ref --short HEAD 2> /dev/null) if [ ! -z $branch ] && [ ! -z $checksum ]; then echo -e " ($branch $checksum)" elif [ ! -z $checksum ]; then echo -e " ($checksum)" elif [ ! -z $branch ]; then echo -e " ($branch)" fi } -
zaps166 revised this gist
May 24, 2017 . No changes.There are no files selected for viewing
-
zaps166 revised this gist
May 24, 2017 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -20,6 +20,9 @@ fi OS=$(uname) if [ $OS == "Darwin" ]; then GIT_COMPLETION_PATH="/Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash" if [[ ! -e $GIT_COMPLETION_PATH ]]; then GIT_COMPLETION_PATH="/Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash" fi else GIT_COMPLETION_PATH="/usr/share/git/completion/git-completion.bash" fi -
zaps166 revised this gist
Feb 4, 2017 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,12 @@ getGitInfo() { checksum=$(git rev-parse --short HEAD 2> /dev/null) if [ ! -z $checksum ]; then branch=$(git symbolic-ref --short HEAD 2> /dev/null) if [ ! -z $branch ]; then echo -e " ($branch $checksum)" else echo -e " ($checksum)" fi fi } -
zaps166 created this gist
Jan 28, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ getGitInfo() { branch=$(git symbolic-ref --short HEAD 2> /dev/null) if [ ! -e $branch ]; then checksum=$(git rev-parse --short HEAD 2> /dev/null) if [ ! -e $checksum ]; then echo -e " ($branch $checksum)" fi fi } if [ $EUID == 0 ] ; then PS1='\[\033[01;31m\][$? \u@\h\[\033[01;36m\] \w\[\033[01;31m\]]\[\033[01;35m\]$(getGitInfo)\[\033[01;31m\]\$\[\033[00m\] ' else PS1='\[\033[01;32m\][$? \u@\h\[\033[01;37m\] \w\[\033[01;32m\]]\[\033[01;35m\]$(getGitInfo)\[\033[01;32m\]\$\[\033[00m\] ' fi OS=$(uname) if [ $OS == "Darwin" ]; then GIT_COMPLETION_PATH="/Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash" else GIT_COMPLETION_PATH="/usr/share/git/completion/git-completion.bash" fi [ -r $GIT_COMPLETION_PATH ] && . $GIT_COMPLETION_PATH