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

Feature: output to file #15

Closed
SomethingGeneric opened this issue Sep 19, 2022 · 4 comments
Closed

Feature: output to file #15

SomethingGeneric opened this issue Sep 19, 2022 · 4 comments

Comments

@SomethingGeneric
Copy link

Probably easiest as -o flag?

@Antiz96
Copy link
Owner

Antiz96 commented Sep 19, 2022

Hey,
Thanks for this great idea.

What would you imagine?

I was thinking about a -o/--output flag that would redirect the output to the specified file; and a -O flag that would redirect the output to a default "man_command.pdf" (or maybe just "command.pdf"?) file in the current directory (kinda like curl does):

  • zaman -o ls ~/Documents/man/ls.pdf would redirect the output to the ~/Documents/man/ls.pdf file.
  • zaman -O ls would redirect the output to the man_ls.pdf file in the current directory.

Would that be okay? If you have any suggestions, let me know!

Also, I'm wondering if I should check if the specified file in the -o argument does not already exists and ask the user for a confirmation before overwriting its content (if it does already exists). That would eventually prevent overwriting a file by mistake.
Any thoughts about this?

@SomethingGeneric
Copy link
Author

Yeah, all of those seem like sane defaults!

@Antiz96
Copy link
Owner

Antiz96 commented Sep 20, 2022

Alright, I'll work on that!

@Antiz96 Antiz96 mentioned this issue Sep 20, 2022
@Antiz96
Copy link
Owner

Antiz96 commented Sep 20, 2022

Feature added in PR #16, available in the v1.1.0 release

@Antiz96 Antiz96 closed this as completed Sep 20, 2022
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

No branches or pull requests

2 participants