From c54911cac5d29253dd79f310b48d0f0f1996b29b Mon Sep 17 00:00:00 2001 From: Chen Asraf Date: Tue, 26 Sep 2023 13:09:52 +0300 Subject: [PATCH] fix: bugs --- .config/nvim/after/plugin/fugitive.lua | 10 +++------- scripts/home/home.sh | 5 +++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.config/nvim/after/plugin/fugitive.lua b/.config/nvim/after/plugin/fugitive.lua index 2d7f66fd..4d09c593 100644 --- a/.config/nvim/after/plugin/fugitive.lua +++ b/.config/nvim/after/plugin/fugitive.lua @@ -15,7 +15,7 @@ autocmd("BufWinEnter", { local bufnr = vim.api.nvim_get_current_buf() local opts = { buffer = bufnr, remap = false } -- print("great success", vim.bo.ft, bufnr, vim.inspect(opts)) - vim.keymap.set("n", "gp", "]]k", opts) + -- vim.keymap.set("n", "gp", "]]k", opts) -- rebase always vim.keymap.set("n", "gl", function() @@ -31,13 +31,9 @@ autocmd("BufWinEnter", { local current_branch = vim.fn.FugitiveHead() local cmd = ":Git push -u origin " .. current_branch - - -- vim.fn.inputsave() - -- vim.fn.input(cmd) - -- vim.fn.inputrestoRe() - - -- prefill input line vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(cmd, true, true, true), "n", true) end, opts); + + vim.keymap.set("n", "gf", ":Git fetch", opts) end, }) diff --git a/scripts/home/home.sh b/scripts/home/home.sh index 7611e383..c5e48896 100644 --- a/scripts/home/home.sh +++ b/scripts/home/home.sh @@ -51,9 +51,10 @@ home() { m | mushclient) shift sub="$1" + mushdir="$HOME/Library/Application Support/CrossOver/Bottles/MushClient/drive_c/users/crossover/MUSHclient" case $sub in backup | b) - rsync -vtr "$HOME/Library/Application Support/CrossOver/Bottles/MushClient/drive_c/users/crossover/MUSHclient" "$DOTFILES/synced/" + rsync -vtr "$mushdir" "$DOTFILES/synced/" echo_yellow "Copied Mushclient profile to synced folder." git -C "$DOTFILES" add "$DOTFILES/synced/MUSHclient" git -C "$DOTFILES" commit -m "backup: mushclient" @@ -61,7 +62,7 @@ home() { echo_yellow "Backup complete." ;; restore | r) - rsync -vtr "$DOTFILES/synced/MUSHclient" "$HOME/Library/Application Support/CrossOver/Bottles/MushClient/drive_c/users/crossover/" + rsync -vtr "$DOTFILES/synced/MUSHclient/" "$mushdir/" echo_yellow "Restored Mushclient profile from synced folder." ;;