I’ve been using this alias:
aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'
to show all aliases in the config file.
but it’s messy – I wanted to add a color to the alias name, before the “=” sign.
So I added some color:
aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | awk '{printf "\033[1;31m" $1 "\033[0m"; $1=""; print $0;}'
it works great when I use the command from the CLI, but when I try to put it in the .gitconfig file it throws an error. something to do with the quotation marks.
I tried to escape them, but to no avail…
How can I get the alias to work?
I gave it a try and it works by just quoting the whole string:
You can have a great help to debug your config by using trace like that: