zsh: bug fix in gloned()

This commit is contained in:
PowerUser64 2021-11-13 04:19:16 -08:00
parent 3db1a646a7
commit 00f7e63d74

2
.zshrc
View file

@ -425,7 +425,7 @@
# Git cLONE cD # Git cLONE cD
gloned() { gloned() {
git clone "$1" git clone "$1" || 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