Hi Jeremy,
the difference of this and the tools we already do so is a hard enable vs auto mode.
The cases we already have are handling --color=auto to only add color if running on a terminal.
Instead the --color of ip is a hard enable.
So if you e.g. do:
$ ip --color a > /tmp/foo
Or if we would set up an alias
$ ip a > /tmp/foo
Then the file would contain control chars which no on wants (and could break parsing/monitoring).
I checked latest upstream git of iproute and it still is that way.
So I'd assume the best would be to file a bug upstream and link it here - what do you think Jeremy?
Hi Jeremy,
the difference of this and the tools we already do so is a hard enable vs auto mode.
The cases we already have are handling --color=auto to only add color if running on a terminal.
Instead the --color of ip is a hard enable.
So if you e.g. do:
$ ip --color a > /tmp/foo
Or if we would set up an alias
$ ip a > /tmp/foo
Then the file would contain control chars which no on wants (and could break parsing/ monitoring) .
I checked latest upstream git of iproute and it still is that way.
So I'd assume the best would be to file a bug upstream and link it here - what do you think Jeremy?