Skip to content

Conversation

@tleonhardt
Copy link
Member

Added the new ppaged() method of cmd2.Cmd which will display text which won't fit on the screen using a pager.

This closes #266

Also:
- Added paged_output.py example
- Modified cmd2 so it keeps track of when output is being redirected so it doesn't attempt to usage a pager in this case
It defaults to an empty string.  But if a user would like a warning to be printed on a
broken pipe error when using poutput() or ppaged(), then they simply set this to the
warning they would like printed to sys.stderr.
@tleonhardt tleonhardt added this to the 0.8.1 milestone Mar 8, 2018
@tleonhardt tleonhardt self-assigned this Mar 8, 2018
@tleonhardt tleonhardt requested a review from kmvanbrunt March 8, 2018 00:47
Aslo:
- Added some documentation for ppaged()
- Updated CHANGELOG
- Added line about ppaged() in README
@codecov
Copy link

codecov bot commented Mar 8, 2018

Codecov Report

Merging #297 into master will decrease coverage by 1.59%.
The diff coverage is 20%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #297     +/-   ##
=========================================
- Coverage   91.48%   89.89%   -1.6%     
=========================================
  Files           1        1             
  Lines        1480     1514     +34     
=========================================
+ Hits         1354     1361      +7     
- Misses        126      153     +27
Impacted Files Coverage Δ
cmd2.py 89.89% <20%> (-1.6%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6f0e06...0979d63. Read the comment docs.

@tleonhardt tleonhardt merged commit 2af4473 into master Mar 8, 2018
@tleonhardt tleonhardt deleted the paged_output branch March 8, 2018 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Explore automatically paging long output

2 participants