Re adds cdg functions based on gclone in rust

This commit is contained in:
Thomas Forgione 2019-02-11 20:54:07 +01:00
parent 99790380f8
commit 9744543884
No known key found for this signature in database
GPG Key ID: BFD17A2D71B3B5E7
1 changed files with 11 additions and 0 deletions

View File

@ -59,3 +59,14 @@ if [ $? -eq 0 ]; then
eval $(thefuck --alias) eval $(thefuck --alias)
fi fi
# change to git directory
cdg() {
local newdir
newdir=$(pgd $1) && cd $newdir
}
_cdg() {
_arguments "1: :($( cat $GCLONE_PATH/.cdgcache | rev | cut -d '/' -f 1 | rev))"
}
compdef _cdg cdg