Forum Discussion

gboudrea's avatar
gboudrea
Occasional Contributor
3 years ago

CLI 2: op run removes colors, ignores terminal size

ls outputs colors, and uses multiple columns:

But using op run, it doesn't:


1Password Version: CLI 2.1.0
Extension Version: Not Provided
OS Version: macOS

14 Replies

  • gboudrea's avatar
    gboudrea
    Occasional Contributor

    Indeed, that fixes it.
    I also noticed other commands (heroku, terraform) correctly detect that colors can be used with op run, and will use color with no additions in the command : i.e. op run --no-masking -- heroku will output colors.

    Thanks.

  • Former Member's avatar
    Former Member

    Hey gboudrea, thank you for reaching out to us!
    I think the problem here is that ls detects op run to not be a terminal-type output, which is why colours are disabled by default (since the default setting for the --color flag is auto).
    Easiest way to fix this would be to include the --color flag in your command, i.e. op run -- ls --color.
    Please do let us know if this helps.

    Best,
    Horia

  • gboudrea's avatar
    gboudrea
    Occasional Contributor

    Then the result shows in columns, but no colors.

  • XIII's avatar
    XIII
    Super Contributor

    What happens if you add --no-masking to op run?