1. 29 Sep, 2021 1 commit
  2. 25 Aug, 2021 1 commit
  3. 13 Jul, 2021 5 commits
  4. 01 Jul, 2021 1 commit
  5. 25 Jun, 2021 3 commits
  6. 19 Jun, 2021 3 commits
  7. 06 Jun, 2021 2 commits
    • Zane Bitter's avatar
      Release v0.3.0 · c041c53c
      Zane Bitter authored
      c041c53c
    • Zane Bitter's avatar
      Protect all of pager cleanup from SIGINT · 89b68b51
      Zane Bitter authored
      It is not enough to catch and handle KeyboardInterrupt while waiting for
      the user to exit the pager. A KeyboardInterrupt can occur between any
      two Python opcodes. Furthermore, it may (indeed, in some cases it
      appears quite likely to) occur while flushing the write buffer and
      closing the output stream.
      
      The only way to fully protect against this is to ignore the signal
      altogether for the duration of the cleanup.
      89b68b51
  8. 05 Jun, 2021 5 commits
  9. 04 Jun, 2021 1 commit
    • Zane Bitter's avatar
      Only disable --quit-if-one-screen when line buffering explicitly enabled · dc67412b
      Zane Bitter authored
      By default, Python enables line buffering on stdout whenever stdout is
      connected to a console - which is exactly when we will start a pager. As
      a consequence, the --quit-if-one-screen option was never enabled unless
      the AutoPager was explicitly created with line_buffering=False.
      
      This isn't a great default, given that the programmer knows that the
      output will be going to a pager, so only disable --quit-if-one-screen if
      line buffering is explicitly turned on.
      dc67412b
  10. 27 May, 2021 1 commit
  11. 15 May, 2021 3 commits
  12. 14 May, 2021 3 commits
  13. 24 Apr, 2021 4 commits
    • Zane Bitter's avatar
      Release v0.2.0 · 0d581b94
      Zane Bitter authored
      0d581b94
    • Zane Bitter's avatar
      Don't reset terminal on pager exit by default · 97565557
      Zane Bitter authored
      Previously, we always allowed less to reset the terminal when exiting
      (as it does by default when being run manually), so that the output of
      the program did not remain on screen. This is desirable in some
      applications, but less so in others. Git does not clear the screen and
      instead leaves the last shown output displayed. Change the default to do
      the same here.
      
      Since clearing the screen is sometimes desirable, add a configuration
      option to allow the developer to choose this.
      
      If we quit the pager immediately due to having less than one screen's
      worth of data to display, then the output will obviously always be left
      on the screen. This is inconsistent with a request to reset the terminal
      on completion, so do not pass this option when the terminal is to be
      reset.
      97565557
    • Zane Bitter's avatar
      Allow user to pass arguments in $PAGER envvar · f2d49222
      Zane Bitter authored
      If the user wishes to override the settings configured in the
      environment, they need to be able to specify a custom PAGER environment
      variable containing arguments as well as the name of the pager. Popen
      does not support this being passed as a string unless shell=True, but we
      generally don't want to be enabling shell interpretation. Therefore
      split the arguments using the shlex module.
      f2d49222
    • Zane Bitter's avatar
      bd335f68
  14. 23 Apr, 2021 7 commits