Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Use less -r instead of less -R
Browse files Browse the repository at this point in the history
  • Loading branch information
swsnr committed Feb 20, 2023
1 parent 76b148f commit a7d8ce3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ Use `cargo release` to create a new release.
### Changed
- Update all dependencies.

### Fixed
- Use `less -r` instead of `less -R` in `mdless` if both `$PAGER` and `$MDCAT_PAGER` are unset (see [GH-238]).

[GH-236]: https://github.com/swsnr/mdcat/pull/236
[GH-238]: https://github.com/swsnr/mdcat/issues/238

## [1.0.0] – 2023-01-07

Expand Down
4 changes: 2 additions & 2 deletions mdcat.1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ mdcat only uses this variable if it fails to query the size from the underlying
MDCAT_PAGER::
The pager program to use for `mdless` or if `--paginate` is given.
+
The pager program must support basic ANSI formatting sequences, like e.g. `less -R`.
The pager program must support basic ANSI formatting sequences, like e.g. `less -r`.
+
The value of this variable is subject to shell-like word-splitting.
It is **not** subject to any kind of expansion or substitution (e.g. parameter expansion, process subsitution, etc.).
Expand All @@ -176,7 +176,7 @@ PAGER::
+
Subject to the same rules as `$MDCAT_PAGER`.
+
If both `$PAGER` and `$MDCAT_PAGER` are unset use `less -R` as pager.
If both `$PAGER` and `$MDCAT_PAGER` are unset use `less -r` as pager.

http_proxy::
https_proxy::
Expand Down
4 changes: 2 additions & 2 deletions src/bin/mdcat/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ fn pager_from_env() -> Result<Vec<String>> {
}
}
}
event!(Level::DEBUG, "Falling back to default pager less -R");
Ok(vec!["less".into(), "-R".into()])
event!(Level::DEBUG, "Falling back to default pager less -r");
Ok(vec!["less".into(), "-r".into()])
}

impl Output {
Expand Down

0 comments on commit a7d8ce3

Please sign in to comment.