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

Global flags are in the way #9783

Open
philderbeast opened this issue Mar 6, 2024 · 2 comments
Open

Global flags are in the way #9783

philderbeast opened this issue Mar 6, 2024 · 2 comments

Comments

@philderbeast
Copy link
Collaborator

philderbeast commented Mar 6, 2024

Lots of commands take targets.

Originally posted by @philderbeast in #9744 (comment)

I thought of maybe listing the commands that take targets but quickly gave up, not wanting to scroll up past 6 pages of global flags to see whether the command takes [TARGETS];

$ cabal build --help
Compile targets within the project.

Usage: cabal build [TARGETS] [FLAGS]

Description ...

Flags for build (includes global flags):
...
1st page of flags
2nd "    "   "
3rd "    "   "
4th "    "   "
5th "    "   "
6th "    "   "

Examples ...

Can we not show the global flags by default?

@geekosaur
Copy link
Collaborator

geekosaur commented Mar 6, 2024

A common pattern is to list the global flags in their own section. For individual commands this might be output after the command-specific flags, or might point the user to a --help-globals option.

@philderbeast
Copy link
Collaborator Author

Yes stack has a separate command for raising the living dead of global flags;

Command 'stack --help' for global options that apply to all subcommands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants