summaryrefslogtreecommitdiff
path: root/git-sleuth
diff options
context:
space:
mode:
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