-
Notifications
You must be signed in to change notification settings - Fork 499
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
Improve --list
output with modules
#2107
Comments
I just merged #2108, which allows passing a submodule path to |
My use case would be commands and subcommands. So, ideally, I'd need the module to be on the same level as the recipes. As to the nesting layout, I'd advise gating behind unstable some directive that controls what is being shown, and iteratively collect feedback as to the layout needs. I'd started with a [folded] directive on the mod declaration to keep the same behaviour as today but add that directive to get the submodule recipes folded. IMO, [folded] should be the default and [unfolded] the explicitly requested functionality, but, well... Again, in the ideal world, the default command of the module should/could be listed as just a recipe in the toplevel, when [folded]. |
Another alternative to this:
Would be listing submodules along with recipes:
This could be done with some kind of visual indication:
|
@casey The visual indication like that would be fine. The only point I'd like, which is perhaps too far fetched, is the ability to do something like: $ just --list --unsorted
Available recipes:
foo
bar…
baz
bob… But I'd really advise for ASCII '...' instead of non-ASCII '…'. I do work, more than occasionally, in a raw tty unix terminal provided by the ubuntu OS when no graphics are available. And I noticed that the fancy utf-8 characters do not pass well. In general terminal tools, so be it. But just should be able to run in such a context, with really low-level stuff. IMO. |
I'm in favor of not displaying the submodules under their own heading as I do think for the one who calls I also don't feel strongly about this as either way as long as the submodule recipes are not shown in the initial I do concur with @gl-yziquel that using plain ASCII would be better than the ellipsis character So like this:
The space between |
Done! I used |
Sorry, I haven't been closely following this since I haven't yet started using modules yet. But if there is a way to extract all recipes - that would be very helpful for easily building tooling (eg: https://github.com/psibi/justl.el) around just. I currently use |
@psibi I believe JSON dumps include submodules, and |
@casey Cool, thanks for the confirmation. |
I had a message drafted yesterday which I forgot to send (re nested output):
Looks like I'm just too late... 😛 |
Collecting feedback from #929.
To sum up:
--list
output with modules is too verbose and nested--list SUBMODULE
and only see--list
output for that submodule, and iteratively descend into submodules withFor 1, I think I agree. The current output is very verbose and gets unwieldy quickly if there are a lot of submodules, and gets quite nested if the module hierarchy is deep. I think that, by default,
--list
should not print out the recipes in submodules, but only the submodules themselves.So something like:
If there are no recipes at the top level, it would just be:
I'm undecided about whether to completely remove the nested output, or require
--verbose
or--nested
or whatever to get it.For 2, I'm working on a patch that allows
--list
to take a module path, which are space- or::
- separated module names, and will descend into that module, and only print the--list
output for that module.@gl-yziquel and @valscion what do you think?
The text was updated successfully, but these errors were encountered: