dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | README | LICENSE

commit f6c940d1a84832f7d604a0fd326cec5bb510f61e (patch)
parent 9fcb3eb9c04463382fb66fc106e14511cdeb3d35
Author: Alex Karle <alex@alexkarle.com>
Date:   Sat, 26 Feb 2022 00:19:01 -0500

plumb: Support 6-char git SHA's

That's the minimum tmux's hotkey will detect.

Also for reference, git-push outputs 7 letter SHAs for this
repo, so 6 feels plausible.

Diffstat:
Mbin/plumb | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/plumb b/bin/plumb @@ -14,7 +14,7 @@ ITEM=$(echo "$ITEM" | awk '{ print $1 }') case "$ITEM" in http*) firefox "$ITEM" ;; - [a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]*) \ + [a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]*) \ tmux split-window "$@" sh -c "git show $ITEM 2>&1 | less" ;; [a-zA-Z0-9.]*:[0-9]*:*) tmux split-window "$@" sh -c "fned \"$ITEM\"" ;; *) tmux split-window "$@" sh -c "vi $ITEM" ;;