summaryrefslogtreecommitdiff
path: root/seek
diff options
context:
space:
mode:
authorBen Sima <bsima@groq.com>2022-02-11 09:39:12 -0800
committerBen Sima <bsima@groq.com>2022-02-11 09:39:12 -0800
commit489017791447ec1f817a6d84988e24a543c40f05 (patch)
tree58a5d4be505fb88b834684cf08e95369aa91a1d1 /seek
parenta3507266f55ac85fed1fde0ac488344e9add29f8 (diff)
seek/nav: handle macos option/alt key nonsense
Diffstat (limited to 'seek')
-rwxr-xr-xseek4
1 files changed, 3 insertions, 1 deletions
diff --git a/seek b/seek
index 317fb49..76382b7 100755
--- a/seek
+++ b/seek
@@ -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}")