Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc --explain: automatically use less on *nix systems #32665

Closed
stelcheck opened this issue Apr 1, 2016 · 11 comments
Closed

rustc --explain: automatically use less on *nix systems #32665

stelcheck opened this issue Apr 1, 2016 · 11 comments
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)

Comments

@stelcheck
Copy link

Ref: https://twitter.com/stelcheck/status/715502560891637760

Since many of the descriptions are rather lengthy, it would be nice to pipe to less by default on OS X, Linux and other *nix systems. Should stdout be piped to another process, this can be detected and disabled fairly easily.

@brson
Copy link
Contributor

brson commented Apr 1, 2016

If we're going to consider a pager for this we should consider how pages fit into rustc output more generally. @nikomatsakis and I have talked a lot about wanting a pager for rustc.

@steveklabnik steveklabnik added the A-frontend Area: Compiler frontend (errors, parsing and HIR) label Apr 2, 2016
@sanmai-NL
Copy link

Please do let any command line utilities default to the value of the environment variable PAGER instead of e.g. less.

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Apr 4, 2016 via email

@stelcheck
Copy link
Author

git seems to be using less.

@sanmai-NL didn't know about PAGER, but agree with you.

edit To clarify: git uses less by default, but is sensitive to the PAGER environment variable.

@nikomatsakis
Copy link
Contributor

From the git man page:

  -p, --paginate
      Pipe all output into less (or if set, $PAGER) if standard

output is a terminal. This overrides the pager. configuration options
(see the
"Configuration Mechanism" section below).

On Mon, Apr 4, 2016 at 10:45 PM, Marc Trudel notifications@github.com
wrote:

git seems to be using less.

@sanmai-NL https://github.com/sanmai-NL didn't know about PAGER, but
agree with you.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#32665 (comment)

@cengiz-io
Copy link
Contributor

Hello.

If it's ok, I'd like to take this issue on me. Do some research and provide options that we can implement.

@Mark-Simulacrum
Copy link
Member

@cengizio Any progress? If not, could someone else take this issue on, or do you still want it?

@cengiz-io
Copy link
Contributor

Hello @Mark-Simulacrum

Thanks for reminding this! This has slipped from my mind. 😱

I'm already working on another issue that involves our UI tests, so yes, if someone else can pick this up, it'd be a faster resolution.

And I'd be happy to re-pick this if there are no takers.

@cengiz-io
Copy link
Contributor

Hello again @Mark-Simulacrum,

I couldn't help myself and I've implemented this for *nix systems. I can send a PR whenever I solve the Windows part.

@Mark-Simulacrum
Copy link
Member

Sounds good!

@cengiz-io
Copy link
Contributor

Hello! This is currently blocked due to #42553

frewsxcv added a commit to frewsxcv/rust that referenced this issue Jun 30, 2017
Add pager support for `rustc --explain EXXXX`

Hello!

This is my take on rust-lang#32665.

Thanks!

**EDIT:** _I've limited access to a Windows machine so this is taking longer than I've anticipated_. 🐢

cc @alexcrichton @nikomatsakis @Mark-Simulacrum @retep998 @ollie27 @afiune
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jun 30, 2017
Add pager support for `rustc --explain EXXXX`

Hello!

This is my take on rust-lang#32665.

Thanks!

**EDIT:** _I've limited access to a Windows machine so this is taking longer than I've anticipated_. 🐢

cc @alexcrichton @nikomatsakis @Mark-Simulacrum @retep998 @ollie27 @afiune
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jun 30, 2017
Add pager support for `rustc --explain EXXXX`

Hello!

This is my take on rust-lang#32665.

Thanks!

**EDIT:** _I've limited access to a Windows machine so this is taking longer than I've anticipated_. 🐢

cc @alexcrichton @nikomatsakis @Mark-Simulacrum @retep998 @ollie27 @afiune
bors added a commit that referenced this issue Jul 4, 2017
Add pager support for `rustc --explain EXXXX`

Hello!

Fixes #32665.

Thanks!

**EDIT:** _I've limited access to a Windows machine so this is taking longer than I've anticipated_. 🐢

cc @alexcrichton @nikomatsakis @Mark-Simulacrum @retep998 @ollie27 @afiune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)
Projects
None yet
Development

No branches or pull requests

7 participants