]> git.friedersdorff.com Git - max/saltfiles.git/commitdiff
Add colorised git alias output
authorMaximilian Friedersdorff <max@friedersdorff.com>
Mon, 17 Jun 2019 10:51:43 +0000 (11:51 +0100)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Mon, 17 Jun 2019 10:51:43 +0000 (11:51 +0100)
states/git/init.sls

index 84d1e59cbc998ccfe58c07d0fc2aad6c0aac3c99..459943c5b9720e0c1fd9022d98a9c42fa696fac5 100644 (file)
@@ -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 %}