summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ar/.config/zsh/scripts.zsh6
1 files changed, 4 insertions, 2 deletions
diff --git a/ar/.config/zsh/scripts.zsh b/ar/.config/zsh/scripts.zsh
index 7f31426..e3364e8 100644
--- a/ar/.config/zsh/scripts.zsh
+++ b/ar/.config/zsh/scripts.zsh
@@ -262,8 +262,10 @@ function ecryptfs_mount() {
alias gcggg=thesiahxyz_git
function thesiahxyz_git() {
choice=$(ssh "$THESIAH_GIT" "ls -a | grep -i \".*\\.git$\"" | fzf --cycle --prompt="  " --height=50% --layout=reverse --border --exit-0)
- [ -n "$choice" ] && [ -n "$1" ] && git clone "${THESIAH_GIT:-git@${THESIAH:-thesiah.xyz}}":"$choice" "$1" ||
- [ -n "$choice" ] && git clone "${THESIAH_GIT:-git@${THESIAH:-thesiah.xyz}}":"$choice"
+ [ -d "$HOME/Private/repos" ] || mkdir -p "$HOME/Private/repos"
+ [ -n "$choice" ] && [ -n "$1" ] && cd "$HOME/Private/repos" && git clone "${THESIAH_GIT:-git@${THESIAH:-thesiah.xyz}}":"$choice" "$1" ||
+ [ -n "$choice" ] && cd "$HOME/Private/repos" && git clone "${THESIAH_GIT:-git@${THESIAH:-thesiah.xyz}}":"$choice"
+ cd -
}