aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-02-23 12:47:34 -0300
committerEuAndreh <eu@euandre.org>2023-02-23 12:47:37 -0300
commit74fe4d3b89b10b80f25a7db0fa0068634a8497f7 (patch)
treed11865045153fa464df6729d688878528651c9e9
parentopt/tests/assert-running-service.sh: Unset LC_ALL (diff)
downloaddotfiles-74fe4d3b89b10b80f25a7db0fa0068634a8497f7.tar.gz
dotfiles-74fe4d3b89b10b80f25a7db0fa0068634a8497f7.tar.xz
etc/sh/rc: Put the g() fzf preview-window above
For long file names or long code lines, that don't fit on half the screen.
-rw-r--r--etc/sh/rc10
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/sh/rc b/etc/sh/rc
index 1050bbe..7c3a07a 100644
--- a/etc/sh/rc
+++ b/etc/sh/rc
@@ -274,11 +274,11 @@ g() {
# shellcheck disable=2086
git grep -E --color=always -n -- "$(cat "$PAT")" ${2:-} |
fzf \
- --exit-0 \
- --select-1 \
- --ansi \
- --delimiter=: \
- --preview-window '+{2}+3/3' \
+ --exit-0 \
+ --select-1 \
+ --ansi \
+ --delimiter=: \
+ --preview-window 'up,+{2}+3/3' \
--preview "$PREVIEW_CMD"
)"
rm -f "$(dirname "$PAT")"/*-g-shell-function