From ab5a381d25b56bed0e112b3ccc980177382ad91c Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 20 Jul 2021 09:39:34 -0400 Subject: init git sleuth --- git-sleuth | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 git-sleuth (limited to 'git-sleuth') 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 -- cgit v1.2.3