Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Quote variables in preview of _forgit_diff, _forgit_reset_head & _forgit_cherry_pick_form_branch #372

Merged
merged 3 commits into from
Mar 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bin/git-forgit
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,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[*]} > \"
Expand Down Expand Up @@ -355,7 +355,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=()
Expand Down Expand Up @@ -527,7 +527,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
Expand Down