From 95ccf190d27ce416c63891cce6b9ed1d6dcfceee Mon Sep 17 00:00:00 2001 From: Michael Kelley Date: Fri, 15 Nov 2024 18:09:11 -0800 Subject: [PATCH] Refactor git hash preview script to show only the first matching hash --- helpers/PsFzfGitHashes-Preview.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/PsFzfGitHashes-Preview.sh b/helpers/PsFzfGitHashes-Preview.sh index be4751b..050e116 100644 --- a/helpers/PsFzfGitHashes-Preview.sh +++ b/helpers/PsFzfGitHashes-Preview.sh @@ -5,5 +5,5 @@ hash=$1 pushd . > /dev/null cd "$dir" -echo $hash | grep -o "[a-f0-9]\{7,\}" | xargs git show $args +echo $hash | grep -o "[a-f0-9]\{7,\}" -m 1 | head -1 | xargs git show $args popd > /dev/null