-
Notifications
You must be signed in to change notification settings - Fork 357
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
FR: A way to discover names of builtin and user defined templates #3175
Comments
Would be cool to generate extra shell completions, Although this yet again requires dynamic completion in clap, eh |
Incidentally I've implemented a variant of 2. Shell completion is another story. iirc, clap doesn't support custom completion logic yet. % jj log -Tbuiltin
Error: Failed to parse template: --> 1:1
|
1 | builtin
| ^-----^
|
= Keyword "builtin" doesn't exist
Hint: Did you mean "builtin_change_id_with_hidden_and_divergent_info", "builtin_log_comfortable", "builtin_log_compact", "builtin_log_detailed", "builtin_log_oneline", "builtin_op_log_comfortable", "builtin_op_log_compact"? For 1, |
Wow, nice! I was checking Is it a valuable addition if % jj log -T
error: a value is required for '--template <TEMPLATE>' but none was supplied
For more information, try '--help'. I'd like to look into implementing that.
Good suggestion, thanks! I think I'll have an alias with slight improvement for that: |
Yeah, but it's a bit trickier to implement because the error is detected earlier by clap. Maybe we can adjust the error message to mention |
Closed by #3200 |
Is your feature request related to a problem? Please describe.
There is some minor friction when I want
jj log -T
with a template and forget its exact name.Describe the solution you'd like
A few possible solutions:
jj
command to print available templates. Cons: too many commands already.jj log -T
could print applicable templates in the error (Is there a notion of an applicable template? I don't know yet). Cons: less discoverable and maybe less intuitive.jj log --help
under the-T
argument (Doesclap
allow that?). Cons: also less discoverable.If 2 and 3 could be done together, perhaps their cons would be less noticeable.
Describe alternatives you've considered
Go to the
jj
repo and find the default config or go to the repo with my own config.Additional context
--
The text was updated successfully, but these errors were encountered: