Skip to content

Commit

Permalink
refactor(search): use key env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
benelan committed Feb 17, 2025
1 parent 9010685 commit 9c5104e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gh-fzf
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ $global_binds
$search_cmd \$FZF_QUERY $multiline_chunker || true
)" \
--bind "change:reload-sync:sleep 0.5; $search_cmd \$FZF_QUERY $multiline_chunker || true" \
--bind 'alt-/:transform:[[ ! $FZF_BORDER_LABEL =~ gh ]] &&
--bind "$GH_FZF_SEARCH_TOGGLE_MODE_KEY"':transform:[[ ! $FZF_BORDER_LABEL =~ gh ]] &&
echo "change-border-label([mode: gh] )+transform-query(
echo \{q} > ${TMPDIR:-/tmp}/gh-fzf-search-query-fzf;
cat ${TMPDIR:-/tmp}/gh-fzf-search-query-gh
Expand All @@ -1038,11 +1038,12 @@ $global_binds
cat ${TMPDIR:-/tmp}/gh-fzf-search-query-fzf
)+unbind(change)+enable-search"
' \
--bind="ctrl-r:execute-silent(
--bind="$GH_FZF_RELOAD_KEY:execute-silent(
rm -f \${TMPDIR:-/tmp}/gh-fzf-search-query-{gh,fzf}
)+transform-query(echo \"$*\")+first+reload-sync:$search_cmd \"$*\"" \
--bind="ctrl-o:execute-silent:$search_open_cmd &" \
--bind="ctrl-y:execute-silent:$search_copy_cmd" \
--bind="$GH_FZF_OPEN_KEY:execute-silent:$search_open_cmd &" \
--bind="$GH_FZF_COPY_KEY:execute-silent:$search_copy_cmd" \
--bind="$GH_FZF_HELP_KEY:execute(GH_PAGER='less -p \"^ ### .search\"' gh repo view benelan/gh-fzf)" \
--bind="alt-1:execute-silent(
echo 100 > ${TMPDIR:-/tmp}/gh-fzf-search-limit
)+reload-sync($search_cmd \$FZF_QUERY $multiline_chunker || true)" \
Expand Down

0 comments on commit 9c5104e

Please sign in to comment.