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

Support both -f and --force flags #13

Closed
chshersh opened this issue Apr 6, 2023 · 2 comments
Closed

Support both -f and --force flags #13

chshersh opened this issue Apr 6, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@chshersh
Copy link
Owner

chshersh commented Apr 6, 2023

Currently, zbg supports only the -f flag for forceful actions:

zbg/lib/cli.ml

Line 17 in 7b44863

flag "f" no_arg ~doc:"Clear forcefully without asking any questions"

However, it would be nice to support --force as well. Unfortunately, it looks like Core.Command doesn't support specifying multiple aliases for the same flag (or maybe I just haven't found it). But it would be nice to have it! (ideally, without rewriting the CLI parser to a different library).

https://ocaml.org/p/core/v0.12.3/doc/Core/Command/Param/index.html

@chshersh chshersh added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Apr 6, 2023
@chshersh
Copy link
Owner Author

It was suggested to use the ?aliases argument of the flag function (docs)

@chshersh chshersh removed the help wanted Extra attention is needed label Apr 13, 2023
chshersh pushed a commit that referenced this issue Jun 26, 2023
* Resolving issue #18 -  status can't print diff when different path than root
* fixed switch but - it will switch to default branch instead of "main"
* Added force alias to -f
* Code formatting
@chshersh
Copy link
Owner Author

Fixed by:

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

1 participant