diff options
| -rw-r--r-- | ar/.config/yazi/keymap-default.toml | 2 | ||||
| -rwxr-xr-x | ar/.local/bin/gitupdate | 7 | ||||
| -rw-r--r-- | mac/.config/yazi/keymap-default.toml | 2 | ||||
| -rwxr-xr-x | mac/.local/bin/gitupdate | 7 |
4 files changed, 14 insertions, 4 deletions
diff --git a/ar/.config/yazi/keymap-default.toml b/ar/.config/yazi/keymap-default.toml index 6b7acad..24c5376 100644 --- a/ar/.config/yazi/keymap-default.toml +++ b/ar/.config/yazi/keymap-default.toml @@ -190,7 +190,7 @@ run = "plugin chmod" desc = "Chmod on selected files" [[mgr.prepend_keymap]] -on = "<C-d>" +on = [ "g", "f" ] run = "plugin diff" desc = "Diff the selected with the hovered file" diff --git a/ar/.local/bin/gitupdate b/ar/.local/bin/gitupdate index a2c65ba..6ee163a 100755 --- a/ar/.local/bin/gitupdate +++ b/ar/.local/bin/gitupdate @@ -73,7 +73,12 @@ else # Add and commit changes git add --all . git commit -m "$message" - git pull --rebase origin "$branch" + if git remote | grep -qx origin; then + remote=origin + else + remote=$(git remote | head -n 1) + fi + git pull --rebase "$remote" "$branch" git remote | xargs -L1 git push --all fi diff --git a/mac/.config/yazi/keymap-default.toml b/mac/.config/yazi/keymap-default.toml index 6b7acad..dd78bc1 100644 --- a/mac/.config/yazi/keymap-default.toml +++ b/mac/.config/yazi/keymap-default.toml @@ -190,7 +190,7 @@ run = "plugin chmod" desc = "Chmod on selected files" [[mgr.prepend_keymap]] -on = "<C-d>" +on = [ "g", "f"] run = "plugin diff" desc = "Diff the selected with the hovered file" diff --git a/mac/.local/bin/gitupdate b/mac/.local/bin/gitupdate index bbe1a92..692a365 100755 --- a/mac/.local/bin/gitupdate +++ b/mac/.local/bin/gitupdate @@ -76,7 +76,12 @@ else # Add and commit changes git add --all . git commit -m "$message" - git pull --rebase origin "$branch" + if git remote | grep -qx origin; then + remote=origin + else + remote=$(git remote | head -n 1) + fi + git pull --rebase "$remote" "$branch" git remote | xargs -L1 git push --all fi |
