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

Add an option to force writing to stdout #37

Merged
merged 1 commit into from
Jan 1, 2024

Conversation

gavinhoward
Copy link
Contributor

This comes from this HN thread.

Since rep always opens a pager (except for one page?), it interferes with the editor opening at the same time.

So I added --stdout to force rep to output to stdout.

This PR may not be great. I am not a Rust programmer, and I admit that I did it in the dumbest way possible.

I'm open to harsh criticism here since this is my first public contribution using Rust. This includes criticism about how I implemented this.

I also tried running rustfmt, but it screamed about being deprecated. I tried installing rustfmt-nightly, and it failed. So if style is wrong, I'm sorry, and I'll fix it manually.

@gavinhoward
Copy link
Contributor Author

Oh, and I understand if this is not something you want. :)

src/input.rs Outdated Show resolved Hide resolved
src/cli.rs Outdated Show resolved Hide resolved
@robenkleene
Copy link
Owner

Thanks @gavinhoward we definitely want to support the use case from the Hacker News comment! I added a couple of minor comments to PR, address those and we'll merge this.

@robenkleene robenkleene merged commit f183315 into robenkleene:main Jan 1, 2024
1 check passed
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.

2 participants