Last active
June 6, 2020 13:21
-
-
Save depressiveRobot/626e7066e77da1659c97 to your computer and use it in GitHub Desktop.
Revisions
-
depressiveRobot revised this gist
Apr 7, 2015 . 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,5 +20,8 @@ function git() { fi git-email-prompt.sh fi else # return the exit code of the failed git command call return $? fi } -
depressiveRobot revised this gist
Jan 29, 2015 . 1 changed file with 1 addition 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 @@ -18,7 +18,7 @@ function git() { # no directory given, parse it from repository url cd $(echo $lastArgument | awk -F/ '{ print $NF }' | rev | sed 's/tig.//' | rev) fi git-email-prompt.sh fi fi } -
depressiveRobot revised this gist
Jan 23, 2015 . 1 changed file with 11 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 @@ -6,16 +6,19 @@ function git() { /usr/local/bin/git $@ if [[ $? -eq 0 ]] # only show prompt if git command was successful then if [[ "$1" = "init" || "$1" = "clone" ]] then if [[ -d "$lastArgument" ]] then # it was the directory argument, cd it cd $lastArgument else # no directory given, parse it from repository url cd $(echo $lastArgument | awk -F/ '{ print $NF }' | rev | sed 's/tig.//' | rev) fi _gitIdentity fi fi } -
depressiveRobot revised this gist
Jan 22, 2015 . 1 changed file with 7 additions and 11 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,15 +1,13 @@ function git() { for i do lastArgument=$i # last argument can be the directory or the repository url done /usr/local/bin/git $@ if [[ "$1" = "init" || "$1" = "clone" ]] then if [[ -d "$lastArgument" ]] then # it was the directory argument, cd it @@ -19,7 +17,5 @@ function git() { cd $(echo $lastArgument | awk -F/ '{ print $NF }' | rev | sed 's/tig.//' | rev) fi _gitIdentity fi } -
depressiveRobot revised this gist
Jan 22, 2015 . 1 changed file with 12 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,19 +1,24 @@ function git() { if [[ "$1" = "init" ]] # ask for identity after init then /usr/local/bin/git $@ _gitIdentity elif [[ "$1" = "clone" ]] # ask for idenity after clone then for i do lastArgument=$i # last argument can be the directory or the repository url done /usr/local/bin/git $@ if [[ -d "$lastArgument" ]] then # it was the directory argument, cd it cd $lastArgument else # no directory given, parse it from repository url cd $(echo $lastArgument | awk -F/ '{ print $NF }' | rev | sed 's/tig.//' | rev) fi _gitIdentity else /usr/local/bin/git $@ fi -
depressiveRobot renamed this gist
Jan 5, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
depressiveRobot renamed this gist
Jan 5, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
depressiveRobot renamed this gist
Jan 5, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
depressiveRobot created this gist
Jan 5, 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,20 @@ function git() { if [[ "$1" = "init" ]] # ask for email after init then /usr/local/bin/git $@ git-email-prompt.sh elif [[ "$1" = "clone" ]] # ask for email after clone then /usr/local/bin/git $@ if [[ "$3" = "" ]] # no directory given, extract from repo name then cd $(echo $2 | awk -F/ '{ print $NF }' | rev | sed 's/tig.//' | rev) else cd $3 fi git-email-prompt.sh else /usr/local/bin/git $@ fi }