diff options
-rwxr-xr-x | nav | 4 | ||||
-rwxr-xr-x | seek | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -1,10 +1,12 @@ +#!/usr/bin/env bash cat \ <(echo "edit: enter | prnt: alt-enter | view: alt-0..6 | pgup/pgdn: scroll") \ <(fd --exclude=_ -t f . $PWD | sed "s,$PWD/*,,g") \ | fzf \ --bind "alt-enter:accept" \ --bind "enter:execute(vim {})" \ - --bind "ctrl-/:change-preview-window(88|hidden|)" \ + --bind "esc:ignore" \ + --bind "ctrl-/:change-preview-window(90%|hidden|)" \ --bind "alt-0:change-preview(bat -p --color always {})" \ --bind "alt-1:change-preview(git log --color=always --date=relative --abbrev-commit --pretty=format:'%Cred%h%Creset %s / %an %Creset%C(yellow)%d%Creset%Cgreen(%cr)%Creset' -- {})" \ --bind "alt-2:change-preview(git log --color=always {})" \ @@ -9,6 +9,8 @@ readarray -t selected <<< "$(fzf \ --disabled \ --query "$INITIAL_QUERY" \ --bind "ctrl-a:select-all" \ + --bind "esc:ignore" \ + --bind "ctrl-/:change-preview-window(90%|hidden|)" \ --bind "alt-0:change-preview:rg --ignore-case --pretty --context 2 {q} {}" \ --bind "alt-1:change-preview(bat -p --color always {})" \ --bind "alt-2:change-preview(git log --color=always --date=relative --abbrev-commit --pretty=format:'%Cred%h%Creset %s / %an %Creset%C(yellow)%d%Creset%Cgreen(%cr)%Creset' -- {})" \ @@ -23,7 +25,7 @@ readarray -t selected <<< "$(fzf \ --bind "change:reload:$RG_DEFAULT_COMMAND {q} || true" \ --print-query \ --preview "rg --ignore-case --pretty --context 2 {q} {}" \ - --preview-window down + --preview-window="down" )" query=${selected[0]} files=("${selected[@]:1}") |