summaryrefslogtreecommitdiff
path: root/examples/paged_output.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-06-16 12:13:07 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2018-06-16 12:13:07 -0400
commitcb23c60fafa525066a4aeed60283a8a794e48ae7 (patch)
tree17d6bbe756c0358df79f4e288ed2f6698cc6c8c8 /examples/paged_output.py
parentb8fa8ce48acacab29d7df52101bff3bcc58ca24f (diff)
downloadcmd2-git-cb23c60fafa525066a4aeed60283a8a794e48ae7.tar.gz
Dramatically changed the approach to this PR
Changes include: - pager is no longer a settable parameter which can be changed by the end user at runtime - The cmd2.Cmd class now has two different attributes: - pager - contains command-line command to use to display wrapped text using a pager - By default set to PAGER environment variable if it exists - 'more' on Windows or 'less -RXF' on POSIX - pager_chop - contains command-line command to use to display chopped (truncated) text using a pager - Set to same thing as pager unless pager starts with 'less', in which case a ' -S' gets appended - The cmd2.Cmd.ppaged() method now has an additional optional argument "chop" which defaults to False - If chop is True, then self.pager_chop gets used as the pager - If chop is False, then slef.pager gets used as the pager I couldn't think of any single solution which would somehow magically make all stakeholders perfectly happy. Hopefully this is a reasonable enough compromise that everyone feels that they can get what they need without too much pain ;-)
Diffstat (limited to 'examples/paged_output.py')
0 files changed, 0 insertions, 0 deletions