On 7/5/22 17:30, Konstantin Khomoutov wrote:
On Tue, Jul 05, 2022 at 12:25:14PM +0300, Konstantin Khomoutov wrote:
[...]
This is admittedly not convenient so it makes sense to turn into an alias:
[alias]
relog = "!relog() { git log --oneline \"$@\" | { n=0; while read line; do printf 'HEAD~%d\t%s\n' $n \"$line\"; n=$((n+1)); done; }; }; relog"
[...]
An alternative to an alias it creating a specially named script file which
must be executable and located in a directorly listed in the environment
variable PATH.
For instance, if you have ~/bin listed in your PATH, you can create a file
named "git-relog" containing the encantation from my first mail in this
thread, then call
$ git relog
and that script will be found and executed.
Thanks for your reply, it does solve my problems.