diff --git a/zsh/gclone.zsh b/zsh/gclone.zsh index 097eb2f..cc0d7c6 100644 --- a/zsh/gclone.zsh +++ b/zsh/gclone.zsh @@ -46,11 +46,15 @@ if [ -d "$GCLONE_PATH" ]; then cat $GCLONE_PATH/.cdgcache | sort | uniq > $GCLONE_PATH/.cdgcache.tmp mv $GCLONE_PATH/.cdgcache.tmp $GCLONE_PATH/.cdgcache fi + retval=0 + else + retval=1 fi # Remove the temp dir rm -rf $tempdir + return $retval } cdg() { @@ -95,7 +99,7 @@ if [ -d "$GCLONE_PATH" ]; then } cdgclone() { - gclone $1 && cdg $1 + gclone $1 && cdg `basename $1` } _cdg() {