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]: Add options to shrs_example (--help,--version) #328

Open
nithinmuthukumar opened this issue Jan 3, 2024 · 3 comments
Open

[Feature]: Add options to shrs_example (--help,--version) #328

nithinmuthukumar opened this issue Jan 3, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@nithinmuthukumar
Copy link
Collaborator

What would you like to see added?

There should be a --version and --help in shrs_example. Would be nice if there was a way to build this out of the box using the shrs library for any shell implementation.

This came up when I was trying to use neofetch in the startup hook. Neofetch calls --version on the SHELL env var to get the version, which currently just runs the shell.

other options should also be considered

@nithinmuthukumar nithinmuthukumar added enhancement New feature or request good first issue Good for newcomers labels Jan 3, 2024
@MrPicklePinosaur
Copy link
Owner

This is technically the end user's responsibility. A lot of great libraries for building clis already exist. We could definitely add command line arguments to shrs_example though, I just dont think shrs should provide anything for this out of the box.

@nithinmuthukumar
Copy link
Collaborator Author

Yeah that makes sense, will change the name of the feature request

@nithinmuthukumar nithinmuthukumar changed the title [Feature]: Basic options when running shell [Feature]: Add options to shrs_example (--help,--version) Jan 4, 2024
@MrPicklePinosaur
Copy link
Owner

I suggest using the clap crate to do this. Most of our builtins use clap for arg parsing too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants