Skip to content

Requested: --color=always option, for piping to other cmds #137

@dreamcat4

Description

@dreamcat4

ATM I can see that the --color flag does work interactively. However when piping to other commands (such as head or tail) then the flag no longer works.

I checked around and this appears to be because the sending program (your program pup in this particular instance). Is switching off colors for non interactive output.

This is actually a desirable characteristic. Unfortunately it cannot be overriden. Wheras other standard linux commands have a special flags to force color to be piped always. For example:

ls --color=always | head

Works fine. This shows me that it's not actually the receiving command (for example head in this example). That is not the thing taking the colors away.

Please see if there is any way that you can add this feature within the Go frameworks / libs environment. Thank you. BTW it might also be interesting to see what jq is doing too. Since this program is intended to be similar to jq. I would then like to request that feature over there if it's also missing from jq. Just haven't checked up on that yet. Kind Regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions