zsh: gloned can now take more than one argument

This commit is contained in:
PowerUser64 2021-12-31 20:40:41 -08:00
parent 677193fa3a
commit 2e7dde150a

View file

@ -1,8 +1,11 @@
#!/bin/bash #!/bin/bash
# Git cLONE cD # Git cLONE cD
# Can take extra arguments for git (ex: gloned url:/repo folder)
git clone "$1" || return $? # shellcheck disable=SC2068,SC2016
git clone $@ || return $?
if ! cd "$(echo "$1" | sed 's/\.git//g' | rev | cut -d '/' -f 1 | rev)";then if ! cd "$(echo "$1" | sed 's/\.git//g' | rev | cut -d '/' -f 1 | rev)";then
echo 'Error: Could not `cd` into the repo' echo 'Error: Could not `cd` into the repo'
return 1 return 1