Skip to content

Commit 9b6846f

Browse files
committed
Click header or backspace w/o prompt will now reload.
1 parent e191b38 commit 9b6846f

File tree

8 files changed

+17
-1
lines changed

8 files changed

+17
-1
lines changed

lib/modules/branch.sh

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ fi
4545
# shellcheck disable=2046,2016,2090,2086
4646
gf_fzf_one -m \
4747
--header "$BRANCH_HEADER" \
48+
--bind 'click-header:reload(git fuzzy helper branch_menu_content)' \
49+
--bind 'backward-eof:reload(git fuzzy helper branch_menu_content)' \
4850
--bind "$BRANCH_CHECKOUT_BINDING" \
4951
--bind "$(lowercase "$GIT_FUZZY_BRANCH_CHECKOUT_FILE_KEY")"':execute(git fuzzy helper branch_checkout_files {1})' \
5052
--bind "$(lowercase "$GIT_FUZZY_BRANCH_DELETE_BRANCH_KEY"):$GF_BRANCH_DELETE_BINDING" \

lib/modules/diff-checkout.sh

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ gf_fzf_diff_checkout() {
2222
--header-lines=2 \
2323
--header "$GF_DIFF_CHECKOUT_HEADER" \
2424
--preview "$PREVIEW_COMMAND" \
25+
--bind "click-header:reload(git fuzzy helper diff_direct_menu_content {q} '$1' '$2')" \
26+
--bind "backward-eof:reload(git fuzzy helper diff_direct_menu_content {q} '$1' '$2')" \
2527
--bind "change:reload($RELOAD_COMMAND)" \
2628
--bind "enter:execute-silent(git fuzzy helper diff_checkout_file '$1' {+})+down"
2729
}

lib/modules/diff-direct.sh

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ gf_fzf_diff_direct() {
2121
--header-lines=2 \
2222
--header "$GF_DIFF_DIRECT_HEADER" \
2323
--preview "$PREVIEW_COMMAND" \
24+
--bind "click-header:reload(git fuzzy helper diff_direct_menu_content {q} $PARAMETERS_QUOTED)" \
25+
--bind "backward-eof:reload(git fuzzy helper diff_direct_menu_content {q} $PARAMETERS_QUOTED)" \
2426
--bind "change:reload($RELOAD_COMMAND)"
2527
}
2628

lib/modules/diff.sh

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ gf_fzf_diff_select() {
2323
--with-nth=2.. \
2424
--header "$GF_DIFF_HEADER" \
2525
--preview "$GF_DIFF_PREVIEW" \
26+
--bind 'click-header:reload(git fuzzy helper diff_menu_content)' \
27+
--bind 'backward-eof:reload(git fuzzy helper diff_menu_content)' \
2628
--bind 'enter:execute([ {1} != "nothing" ] && git fuzzy helper diff_select {+2})'
2729
}
2830

lib/modules/log.sh

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ gf_fzf_log() {
3232
--header-lines=2 \
3333
--header "$GF_LOG_HEADER" \
3434
--preview 'git fuzzy helper log_preview_content {..} {q} {+..}' \
35+
--bind "click-header:reload(git fuzzy helper log_menu_content {q} $PARAMS_FOR_SUBSTITUTION)" \
36+
--bind "backward-eof:reload(git fuzzy helper log_menu_content {q} $PARAMS_FOR_SUBSTITUTION)" \
3537
--bind "change:reload(git fuzzy helper log_menu_content {q} $PARAMS_FOR_SUBSTITUTION)" \
3638
--bind "$(lowercase "$GIT_FUZZY_LOG_COMMIT_KEY"):execute(git fuzzy helper log_open_diff commit {..})" \
3739
--bind "$(lowercase "$GIT_FUZZY_LOG_WORKING_COPY_KEY"):execute(git fuzzy helper log_open_diff working_copy {..})" \

lib/modules/reflog.sh

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ gf_fzf_reflog() {
3232
--header "$GF_REFLOG_HEADER" \
3333
--preview 'git fuzzy helper reflog_preview_content {1} {q} {+..}' \
3434
--bind "change:reload(git fuzzy helper reflog_menu_content {q} $PARAMS_FOR_SUBSTITUTION)" \
35+
--bind "click-header:reload(git fuzzy helper reflog_menu_content {q} $PARAMS_FOR_SUBSTITUTION)" \
36+
--bind "backward-eof:reload(git fuzzy helper reflog_menu_content {q} $PARAMS_FOR_SUBSTITUTION)" \
3537
--bind "$(lowercase "$GIT_FUZZY_REFLOG_COMMIT_KEY"):execute(git fuzzy diff {1}^ {1})" \
3638
--bind "$(lowercase "$GIT_FUZZY_REFLOG_WORKING_COPY_KEY"):execute(git fuzzy diff {1})" \
3739
--bind "$(lowercase "$GIT_FUZZY_REFLOG_MERGE_BASE_KEY"):"'execute(git fuzzy diff "$(git merge-base "'"$GF_BASE_BRANCH"'" {1})" {1})'

lib/modules/stash.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ gf_fzf_stash() {
2323
--header-lines=2 \
2424
--header "$GF_STASH_HEADER" \
2525
--preview 'git fuzzy helper stash_preview_content {1}' \
26+
--bind 'click-header:reload(git fuzzy helper stash_menu_content '"$(quote_params "$@")"')' \
27+
--bind 'backward-eof:reload(git fuzzy helper stash_menu_content '"$(quote_params "$@")"')' \
2628
--bind "$(lowercase "$GIT_FUZZY_DROP_KEY"):execute(git fuzzy helper stash_drop {1})+reload(git fuzzy helper stash_menu_content)" \
2729
--bind "$(lowercase "$GIT_FUZZY_POP_KEY"):execute(git fuzzy helper stash_pop {1})+reload(git fuzzy helper stash_menu_content)" \
2830
--bind "$(lowercase "$GIT_FUZZY_APPLY_KEY"):execute(git fuzzy helper stash_apply {1})+reload(git fuzzy helper stash_menu_content)"
2931
}
3032

3133
gf_stash() {
3234
# NB: first parameter is the "query", which is empty right now
33-
git fuzzy helper stash_menu_content "$@" | gf_fzf_stash
35+
git fuzzy helper stash_menu_content "$@" | gf_fzf_stash "$@"
3436
}

lib/modules/status.sh

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ gf_fzf_status() {
3232
--expect="$(lowercase "$GIT_FUZZY_STATUS_EDIT_KEY"),$(lowercase "$GIT_FUZZY_STATUS_COMMIT_KEY"),$(lowercase "$GIT_FUZZY_STATUS_ADD_PATCH_KEY")" \
3333
--nth=2 \
3434
--preview 'git fuzzy helper status_preview_content {1} {2} {4}' \
35+
--bind 'click-header:reload(git fuzzy helper status_menu_content)' \
36+
--bind 'backward-eof:reload(git fuzzy helper status_menu_content)' \
3537
--bind "$(lowercase "$GIT_FUZZY_STATUS_AMEND_KEY"):execute-silent(git fuzzy helper status_amend {+2..})+down+$RELOAD" \
3638
--bind "$(lowercase "$GIT_FUZZY_STATUS_ADD_KEY"):execute-silent(git fuzzy helper status_add {+2..})+down+$RELOAD" \
3739
--bind "$(lowercase "$GIT_FUZZY_STATUS_RESET_KEY"):execute-silent(git fuzzy helper status_reset {+2..})+down+$RELOAD" \

0 commit comments

Comments
 (0)