gitcd (git clone + cd)
This commit is contained in:
parent
3961e16804
commit
5f1b53cb9e
1 changed files with 8 additions and 0 deletions
8
dotconfig/fish/functions/gitcd.fish
Normal file
8
dotconfig/fish/functions/gitcd.fish
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
function gitcd
|
||||||
|
if set -q argv[2]
|
||||||
|
set clonedir $argv[2]
|
||||||
|
else
|
||||||
|
set clonedir (basename -s '.git' $argv[1])
|
||||||
|
end
|
||||||
|
git clone $argv[1] $clonedir && cd $clonedir
|
||||||
|
end
|
Loading…
Reference in a new issue