Last active
July 26, 2020 00:51
-
-
Save shivabhusal/dce86c2edbd8936f8715 to your computer and use it in GitHub Desktop.
Revisions
-
shivabhusal revised this gist
Jul 8, 2016 . 1 changed file with 10 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 @@ -3,6 +3,16 @@ # stackoverflow: users/3437900/illusionist ########################################## # Usages: # - create a file called ~/.promptrc # - add following in ~/.bashrc # `source ~/.promptrc` # # this will include the source of the file # Content of the file ~/.promptrc # @returns {String} # Eg: master function parse_git_branch () { -
shivabhusal revised this gist
Jul 8, 2016 . 1 changed file with 25 additions and 8 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,11 +1,28 @@ # Author : Shiva Bhusal # github: shivabhusal # stackoverflow: users/3437900/illusionist ########################################## # @returns {String} # Eg: master function parse_git_branch () { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' } RED="\[\033[0;31m\]" YELLOW="\[\033[0;33m\]" GREEN="\[\033[0;32m\]" BLUE="\[\033[0;34m\]" LIGHT_RED="\[\033[1;31m\]" LIGHT_GREEN="\[\033[1;32m\]" WHITE="\[\033[1;37m\]" LIGHT_GRAY="\[\033[0;37m\]" NO_COLOR="\[\033[0m\]" RUBY_VERSION="\$(~/.rvm/bin/rvm-prompt)" # \w --> working directory # \u --> current user # \h --> Computer name export PS1="$GREEN\u:$BLUE\w$YELLOW (${RUBY_VERSION} : $(parse_git_branch)) $NO_COLOR$ " -
shivabhusal revised this gist
Feb 27, 2016 . No changes.There are no files selected for viewing
-
shivabhusal renamed this gist
Jul 1, 2015 . 1 changed file with 0 additions and 1 deletion.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,4 +1,3 @@ function parse_git_branch () { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } -
shivabhusal created this gist
Jul 1, 2015 .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,12 @@ function parse_git_branch () { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } RED="\[\033[0;31m\]" YELLOW="\[\033[0;33m\]" GREEN="\[\033[0;32m\]" NO_COLOR="\[\033[0m\]" PS1="$GREEN\u@\h$NO_COLOR:\w$YELLOW\$(parse_git_branch)$NO_COLOR\$ "