I've tried to do almost the same as described here, with same problems:
Creating a 'git log' alias with formatting
Solutions from this topic, of course, works.
But let say I want to group my git functions in git namespace, that is, to run git gl "some time ago"
.
But when I try to define function directly in .gitconfig:
gl = "!f() { git log --all --pretty=format:'%h %cd %s (%an)' --since="$1"; }; f"
,
I have same error as before - fatal: ambiguous argument ...lalala...
.
Same happens even when function is defined in .bash_profile and called from git alias.
It's not so big problem to use "global" functions, but I want to know, why this happens? And is it possible at all to define such function in .gitconfig?