Skip to content

pager: use --R/--RAW-CONTROL-CHARS with less#4369

Merged
efiop merged 1 commit intotreeverse:masterfrom
pmrowla:pager-control-chars
Aug 10, 2020
Merged

pager: use --R/--RAW-CONTROL-CHARS with less#4369
efiop merged 1 commit intotreeverse:masterfrom
pmrowla:pager-control-chars

Conversation

@pmrowla
Copy link
Contributor

@pmrowla pmrowla commented Aug 10, 2020

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

  • Enables support for ANSI terminal color escape sequences in less (needed eventually for experiments)

DEFAULT_PAGER_FORMATTED = "{} --chop-long-lines --clear-screen".format(
DEFAULT_PAGER
DEFAULT_PAGER_FORMATTED = (
f"{DEFAULT_PAGER} --chop-long-lines --clear-screen --RAW-CONTROL-CHARS"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that we want the capital -R option and not lowercase -r to only enable output for color escape sequences (lowercase -r enables raw output for all terminal escape sequences)

@pmrowla pmrowla requested review from efiop, pared and skshetry August 10, 2020 07:20
Copy link
Contributor

@efiop efiop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@efiop efiop merged commit fef635c into treeverse:master Aug 10, 2020
@pmrowla pmrowla deleted the pager-control-chars branch August 25, 2020 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants