#!/bin/sh # Copyright © 2024 Sean Whitton # SPDX-License-Identifier: MIT if [ $# -gt 1 ]; then echo >&2 "usage: git rl []" exit 255 fi git reflog show -10 --color=always \ --format="* %C(black white)%h%Creset..:%x09\ %C(red bold)%gd%Creset%x09\ %C(black white)%>(15)%cr %Creset%x09\ %C(cyan bold)%gs%Creset" \ "${1:-$(git symbolic-ref --short HEAD)}" \ | sed -e 's# ago \[m\t# \[m\t#' -e 's#: #\[m\t#' \ | column -t -s\ -o\ -l5 -T5