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

jj -h --color=never and jj -h --no-pager do not work with options in this order #4746

Closed
ilyagr opened this issue Oct 31, 2024 · 2 comments
Closed
Labels
🐛bug Something isn't working

Comments

@ilyagr
Copy link
Collaborator

ilyagr commented Oct 31, 2024

jj --color=never -h and jj --no-pager -h work as expected. jj -h --color=never and jj -h --no-pager ignore the extra option.

Specifications

  • Platform: ARM Mac OS
  • Version: Today's nightly, jj 0.22.0-f2acb98ef2a0b33e665d28d58b59bd3d713b0fbd
@ilyagr ilyagr changed the title jj -h --color=never and jj -h --no-pager do not work jj -h --color=never and jj -h --no-pager do not work with options in this order Oct 31, 2024
@yuja
Copy link
Collaborator

yuja commented Nov 1, 2024

Just for reference, see this thread for how -h/--help is interpreted by clap: #4518 (comment)

@ilyagr ilyagr added the 🐛bug Something isn't working label Nov 1, 2024
@ilyagr
Copy link
Collaborator Author

ilyagr commented Nov 2, 2024

From a certain perspective, this could seem quite minor, but I think it is worth addressing (if we can) because:

  • this will happen to beginners and people looking for help
  • this messes up the principle that the order of jj arguments is usually irrelevant
  • these two points combined mean that it may take new people a long time to realize this is an exception from a rule. They will instead wonder every time whether reordering arguments will trip them up, and might abandon jj thinking the UI is confusing.

Of course, this does not mean that any amount of tortured code is acceptable to solve this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants