From: Maximilian Friedersdorff Date: Mon, 17 Jun 2019 10:51:43 +0000 (+0100) Subject: Add colorised git alias output X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=b7bb5705ad376f887c54474b20273855e21a8d75;p=max%2Fsaltfiles.git Add colorised git alias output --- diff --git a/states/git/init.sls b/states/git/init.sls index 84d1e59..459943c 100644 --- a/states/git/init.sls +++ b/states/git/init.sls @@ -28,13 +28,15 @@ include: 'alias.vt': 'tag -v', 'alias.tag': 'tag -s', 'alias.t': 'tag -s', + 'alias.alias': '!req=$\'\\033[0;31m=\\033[0m\'; git config --get-regexp ^alias\. | sed -e s/^alias\.// -e "s/\ /\t$req\ /"', } %} {% for var,val in git_confs.items() %} {{ var }}: git.config_set: - - value: {{ val }} + - value: >- + {{ val }} - global: True - user: {{ grains['user'] }} {% endfor %}