summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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