summaryrefslogtreecommitdiff
path: root/git-sleuth
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-07-20 09:39:34 -0400
committerBen Sima <ben@bsima.me>2021-07-20 09:39:34 -0400
commitab5a381d25b56bed0e112b3ccc980177382ad91c (patch)
tree710a57508a587385637d4c9fdc2c184abeb1d0ec /git-sleuth
parent68517d43c625d9269ef5f1eb60729b9b00fec831 (diff)
init git sleuth
Diffstat (limited to 'git-sleuth')
-rwxr-xr-xgit-sleuth14
1 files changed, 14 insertions, 0 deletions
diff --git a/git-sleuth b/git-sleuth
new file mode 100755
index 0000000..364efaf
--- /dev/null
+++ b/git-sleuth
@@ -0,0 +1,14 @@
+#!/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 \
+ --multi \
+ --exact \
+ --ansi \
+ --phony \
+ --bind "ctrl-a:select-all" \
+ --bind "change:reload:$SEARCH_DEFAULT_COMMAND || true" \
+ --preview "git show --color=always {1}" \
+ | cut -d' ' -f1 \
+ | xargs git rev-parse