From 1a1153978f666565a64bcfef87213279ba724cd9 Mon Sep 17 00:00:00 2001 From: sandr01d <88739791+sandr01d@users.noreply.github.com> Date: Sun, 31 Mar 2024 00:30:00 +0100 Subject: [PATCH] Refactor: Quote variables in preview of _forgit_diff, _forgit_reset_head & _forgit_cherry_pick_form_branch (#372) --- bin/git-forgit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/git-forgit b/bin/git-forgit index 058566c4..49917819 100755 --- a/bin/git-forgit +++ b/bin/git-forgit @@ -265,7 +265,7 @@ _forgit_diff() { opts=" $FORGIT_FZF_DEFAULT_OPTS +m -0 --bind=\"enter:execute($FORGIT diff_enter {} $escaped_commits | $_forgit_enter_pager)\" - --preview=\"$FORGIT diff_view {} $_forgit_preview_context $escaped_commits\" + --preview=\"$FORGIT diff_view {} '$_forgit_preview_context' $escaped_commits\" --bind=\"alt-e:execute-silent($FORGIT edit_diffed_file {})+refresh-preview\" $FORGIT_DIFF_FZF_OPTS --prompt=\"${commits[*]} > \" @@ -357,7 +357,7 @@ _forgit_reset_head() { opts=" $FORGIT_FZF_DEFAULT_OPTS -m -0 - --preview=\"$FORGIT reset_head_preview \"$rootdir\"/{}\" + --preview=\"$FORGIT reset_head_preview '$rootdir'/{}\" $FORGIT_RESET_HEAD_FZF_OPTS " files=() @@ -529,7 +529,7 @@ _forgit_cherry_pick_from_branch() { opts=" $FORGIT_FZF_DEFAULT_OPTS +s +m --tiebreak=index --header-lines=1 - --preview=\"$FORGIT cherry_pick_from_branch_preview \"$base\" {1}\" + --preview=\"$FORGIT cherry_pick_from_branch_preview '$base' {1}\" $FORGIT_CHERRY_PICK_FROM_BRANCH_FZF_OPTS " # loop until either the branch selector is closed or a commit to be cherry