diff --git a/configs/zshrc-append b/configs/zshrc-append index 328043e..ff444ae 100644 --- a/configs/zshrc-append +++ b/configs/zshrc-append @@ -3,10 +3,6 @@ export EDITOR=nvim _zap() { if [[ -d .jj || -d .git ]]; then clear -x - if command rad . > /dev/null 2>&1 - then - rad sync - fi; local repo_type="" if [[ -d .git && -d .jj ]]; then @@ -19,6 +15,16 @@ _zap() { echo "📂 Opened $repo_type repository: $(pwd)" + if command rad . > /dev/null 2>&1 + then + rad sync + if ! command git ls-remote --exit-code origin > /dev/null 2>&1 + then + echo "Pointing origin to rad." + git remote add origin "$(git remote get-url rad --push)" + fi + fi; + if [[ -d .git ]]; then git fetch else