Colored git output piped to sponge
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
git
will color it's output. Staged changes are green and deleted files are red for example.
I have a script running several git
commands in parallel and I use sponge
to get a nicer output.
But using sponge
removes the colors, is there a way to change that?
pipe colors git
add a comment |Â
up vote
0
down vote
favorite
git
will color it's output. Staged changes are green and deleted files are red for example.
I have a script running several git
commands in parallel and I use sponge
to get a nicer output.
But using sponge
removes the colors, is there a way to change that?
pipe colors git
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
git
will color it's output. Staged changes are green and deleted files are red for example.
I have a script running several git
commands in parallel and I use sponge
to get a nicer output.
But using sponge
removes the colors, is there a way to change that?
pipe colors git
git
will color it's output. Staged changes are green and deleted files are red for example.
I have a script running several git
commands in parallel and I use sponge
to get a nicer output.
But using sponge
removes the colors, is there a way to change that?
pipe colors git
pipe colors git
edited Oct 3 '17 at 16:22
Jeff Schaller
32.3k849109
32.3k849109
asked Oct 3 '17 at 11:32
rinu
12
12
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
Yes, you can force git
to output colour codes. For many git
subcommands, you can add the --color
option:
git log --color | sponge
For others, youâÂÂll need to configure the colour output using configuration directives; either per command:
git -c color.status=always status | sponge
or for good in one of the configuration files:
git config --global color.status always
git status | sponge
(By default, git
disables colour output when its output is sent somewhere other than a terminal. If you want to set the color
directive for --color
compatible subcommands, you need to use the color.ui
key: git config --global color.ui always
.)
That doesn't work forgit status
â rinu
Oct 4 '17 at 6:50
IâÂÂve updated my answer; I didnâÂÂt realise you were looking forstatus
(although the green and red references should have given me the hint).
â Stephen Kitt
Oct 4 '17 at 7:03
add a comment |Â
up vote
-1
down vote
accepted
Now that I knew what to look for, I found the answer on Stack Overflow:
git -c color.ui=always -c color.status=always status | sponge
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
Yes, you can force git
to output colour codes. For many git
subcommands, you can add the --color
option:
git log --color | sponge
For others, youâÂÂll need to configure the colour output using configuration directives; either per command:
git -c color.status=always status | sponge
or for good in one of the configuration files:
git config --global color.status always
git status | sponge
(By default, git
disables colour output when its output is sent somewhere other than a terminal. If you want to set the color
directive for --color
compatible subcommands, you need to use the color.ui
key: git config --global color.ui always
.)
That doesn't work forgit status
â rinu
Oct 4 '17 at 6:50
IâÂÂve updated my answer; I didnâÂÂt realise you were looking forstatus
(although the green and red references should have given me the hint).
â Stephen Kitt
Oct 4 '17 at 7:03
add a comment |Â
up vote
3
down vote
Yes, you can force git
to output colour codes. For many git
subcommands, you can add the --color
option:
git log --color | sponge
For others, youâÂÂll need to configure the colour output using configuration directives; either per command:
git -c color.status=always status | sponge
or for good in one of the configuration files:
git config --global color.status always
git status | sponge
(By default, git
disables colour output when its output is sent somewhere other than a terminal. If you want to set the color
directive for --color
compatible subcommands, you need to use the color.ui
key: git config --global color.ui always
.)
That doesn't work forgit status
â rinu
Oct 4 '17 at 6:50
IâÂÂve updated my answer; I didnâÂÂt realise you were looking forstatus
(although the green and red references should have given me the hint).
â Stephen Kitt
Oct 4 '17 at 7:03
add a comment |Â
up vote
3
down vote
up vote
3
down vote
Yes, you can force git
to output colour codes. For many git
subcommands, you can add the --color
option:
git log --color | sponge
For others, youâÂÂll need to configure the colour output using configuration directives; either per command:
git -c color.status=always status | sponge
or for good in one of the configuration files:
git config --global color.status always
git status | sponge
(By default, git
disables colour output when its output is sent somewhere other than a terminal. If you want to set the color
directive for --color
compatible subcommands, you need to use the color.ui
key: git config --global color.ui always
.)
Yes, you can force git
to output colour codes. For many git
subcommands, you can add the --color
option:
git log --color | sponge
For others, youâÂÂll need to configure the colour output using configuration directives; either per command:
git -c color.status=always status | sponge
or for good in one of the configuration files:
git config --global color.status always
git status | sponge
(By default, git
disables colour output when its output is sent somewhere other than a terminal. If you want to set the color
directive for --color
compatible subcommands, you need to use the color.ui
key: git config --global color.ui always
.)
edited Oct 4 '17 at 7:03
answered Oct 3 '17 at 11:49
Stephen Kitt
145k22317382
145k22317382
That doesn't work forgit status
â rinu
Oct 4 '17 at 6:50
IâÂÂve updated my answer; I didnâÂÂt realise you were looking forstatus
(although the green and red references should have given me the hint).
â Stephen Kitt
Oct 4 '17 at 7:03
add a comment |Â
That doesn't work forgit status
â rinu
Oct 4 '17 at 6:50
IâÂÂve updated my answer; I didnâÂÂt realise you were looking forstatus
(although the green and red references should have given me the hint).
â Stephen Kitt
Oct 4 '17 at 7:03
That doesn't work for
git status
â rinu
Oct 4 '17 at 6:50
That doesn't work for
git status
â rinu
Oct 4 '17 at 6:50
IâÂÂve updated my answer; I didnâÂÂt realise you were looking for
status
(although the green and red references should have given me the hint).â Stephen Kitt
Oct 4 '17 at 7:03
IâÂÂve updated my answer; I didnâÂÂt realise you were looking for
status
(although the green and red references should have given me the hint).â Stephen Kitt
Oct 4 '17 at 7:03
add a comment |Â
up vote
-1
down vote
accepted
Now that I knew what to look for, I found the answer on Stack Overflow:
git -c color.ui=always -c color.status=always status | sponge
add a comment |Â
up vote
-1
down vote
accepted
Now that I knew what to look for, I found the answer on Stack Overflow:
git -c color.ui=always -c color.status=always status | sponge
add a comment |Â
up vote
-1
down vote
accepted
up vote
-1
down vote
accepted
Now that I knew what to look for, I found the answer on Stack Overflow:
git -c color.ui=always -c color.status=always status | sponge
Now that I knew what to look for, I found the answer on Stack Overflow:
git -c color.ui=always -c color.status=always status | sponge
edited Oct 4 '17 at 9:47
answered Oct 4 '17 at 6:59
rinu
12
12
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f395812%2fcolored-git-output-piped-to-sponge%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password