Enable fish to complete recipes in modules #2514
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, thanks for making just. One of the big reasons for me to use it is because of the completions. However, recipes in modules aren't completed at all (in fish), so I basically didn't use that feature.
I ended up writing the completions for that myself. I have them checked into my dotfiles now, so merging this PR isn't urgent for me. I thought I'd share it in case it is deemed useful for others.
It's quite a bit more verbose, but I didn't find a way to make it more concise without also making it more obtuse and hard to understand.
I should also say that this logic parses the output of:
I might have missed some edge cases of that output format if it's related to a feature I personally don't use. For example, I haven't used groups so far, I only noticed my lack of handling
[group_name]
headers when I tried out my completions on thejust
repo itself. Recipe arguments and descriptions should be handled the same way as the existing completions.