aws / aws/aws-cli

Make help text plain when piped to terminal in aws2

Open
#4,661 10 comments 0 reactions 0 assignees View on GitHub
enhancement feature-request p3 v2
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

I would like for the text output of aws2 to be plain text when it is not sent to tty, i.e. it's going to a pipe or file. If I do this:

```
[lousyd ~]# /usr/local/bin/aws2 help | grep -- '--query'
--query (string)
```

But if I do this:

```
[lousyd ~]# /usr/local/bin/aws2 help | grep -- '^\s\+--query'
```

...nothing. That's because:

```
[lousyd ~]# /usr/local/bin/aws2 help | grep -- '--query' | cat -A
^[[1m--query ^[[22m(string)$
```

There's a bunch of other junk in there meant to make the output look pretty in the terminal. But that junk just gets in the way of standard text processing.

Please either make help output plain text when output is not to a tty, or just output plain text all of the time.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.