dbcli / mssql-cli

A command-line client for SQL Server with auto-completion and syntax highlighting
BSD 3-Clause "New" or "Revised" License
1.35k stars 192 forks source link

Set auto expand to false if less pager is installed #423

Closed ellbosch closed 4 years ago

ellbosch commented 4 years ago

This PR brings support for horizontal paging out-of-the-box, given the following criteria are met:

  1. less is installed on machine, and
  2. vertical output setting is set to auto or never

For Linux users, this should bring horizontal paging as a standard experience, given that less is usually installed by default.

Tag: #411

ellbosch commented 4 years ago

@pensivebrian I needed to change our approach slightly since my implementation doesn't work on Python 2.

I'll look at tests now. It may be imperfect since we'll be testing without a less pager installed on these machines.

ellbosch commented 4 years ago

@pensivebrian bugs are fixed and the PR is ready for re-review again :)