Set sensible pager defaults for output
Open
feature-request
p2
pager
v2
- Dominant language
- Python
- Stars
- 17.3k
- Forks
- 4.6k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 13
Description
Right now the output paginates. This is great for interactive human usage, but "set an environment variable you likely didn't know existed" for using v2 with scripts isn't ideal.
Instead a "generally does the right thing by default approach" such as:
```
if not sys.stdout.isatty() and not pager_config_set_explicitly:
pager = None
```
solves for the most common case. Namely, "I want to use a pager if you're outputting to a shell, but if you're being invoked via script I almost certainly don't want to use a pager."
`git log` vs. `git log | cat` exhibits this behavior, as a citation.
Contributor guide
Assessment
This issue has not been assessed yet.