X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/blobdiff_plain/75e9293975f0308899d964e9b266280c636e101b..7ea2788673e7a857036c99edefb10e0fe17c6bd9:/user/git-bk-find-file diff --git a/user/git-bk-find-file b/user/git-bk-find-file index f4ef58e..b1feb0d 100755 --- a/user/git-bk-find-file +++ b/user/git-bk-find-file @@ -3,7 +3,7 @@ # Usage: git-bk-find-file [string grep pattern] # Example git-bk-find-file '.txt$' # Ref/Attrib: albfan "How can I search Git branches for a file or directory?" https://stackoverflow.com/a/16868704/10850071 -# Version: 0.1.0 +# Version: 0.2.0 # Depends: GNU bash v5.1.16, GNU parallel 20210822 yell() { echo "$0: $*" >&2; } # print script path and all args to stderr @@ -34,8 +34,8 @@ display_commit() { # Get commit timestamp time="$(git -c log.showSignature=false show -s --format=%cI "$commit")"; - # Get last 8 chars of commit - short_commit="${commit:(-8)}"; + # Get first 8 chars of commit + short_commit="${commit:0:8}"; # Output results while read -r line; do