summaryrefslogtreecommitdiff
path: root/git-sleuth
diff options
context:
space:
mode:
authorBen Sima <bsima@groq.com>2022-02-09 14:10:26 -0800
committerBen Sima <bsima@groq.com>2022-02-09 14:10:46 -0800
commit504c362629fb9cfdc982a29624243dfaad7b7800 (patch)
treef2c8488bed59327605fcb30b435c5fadca3a2793 /git-sleuth
parentd04b76c322803528e017e696ff9350c7e160dcdc (diff)
git-sleuth changes
Not sure about this script but w/e
Diffstat (limited to 'git-sleuth')
-rwxr-xr-xgit-sleuth8
1 files changed, 5 insertions, 3 deletions
diff --git a/git-sleuth b/git-sleuth
index 9e9f560..e5f17fd 100755
--- a/git-sleuth
+++ b/git-sleuth
@@ -1,14 +1,16 @@
#!/usr/bin/env bash
set -euo pipefail
SEARCH_DEFAULT_COMMAND="git log --color=always -S {q} --oneline --no-show-signature"
-FZF_DEFAULT_COMMAND="git log --color=always --oneline --no-show-signature"
+FZF_DEFAULT_COMMAND="git log --color=always -S {q} --oneline --no-show-signature"
fzf \
--multi \
--exact \
--ansi \
--phony \
+ --query="$@" \
--bind "ctrl-a:select-all" \
--bind "change:reload:$SEARCH_DEFAULT_COMMAND || true" \
- --preview "git show --color=always {1}" \
- | cut -d' ' -f1 \
+ --preview "git show --stat --color=always {1}" \
+ | cut -d' ' -f1
+ | tr '\n' ' '
| xargs git show