Skip to content

Global Recipe Completion#3012

Closed
jtmonroe wants to merge 2 commits intocasey:masterfrom
jtmonroe:patch-1
Closed

Global Recipe Completion#3012
jtmonroe wants to merge 2 commits intocasey:masterfrom
jtmonroe:patch-1

Conversation

@jtmonroe
Copy link
Copy Markdown

When completions happen with a local justfile present, global recipes are ignored. All this does is allow for them to appear. A better strategy may be to consume the -g|--global-justfile argument and use that to inspire the autocomplete. However, since running just <GLOBAL_RECIPE> without the -g flag works, I think this may violate the best approach.

When completions happen with a local justfile present, global recipes are ignored. All this does is allow for them to appear. A better strategy may be to consume the `-g|--global-justfile` argument and use that to inspire the autocomplete. However, since running `just <GLOBAL_RECIPE>` without the `-g` flag works, I think this may violate the best approach.
@laniakea64
Copy link
Copy Markdown
Contributor

running just <GLOBAL_RECIPE> without the -g flag works,

That does not work for me

@jtmonroe
Copy link
Copy Markdown
Author

jtmonroe commented Dec 10, 2025

running just <GLOBAL_RECIPE> without the -g flag works,

That does not work for me

You are right, I forgot I had fallback on the justfile! It may be better to consume the -g argument then. Thoughts?

If the preceding flag is `--global-justfile | -g`, the recipe completions will now list the global recipes. We do not need path checking since global file resolution is already implemented.
@jtmonroe
Copy link
Copy Markdown
Author

This should work better now. It aligns better with existing behaviours and the presence of the --global-justfile | -g flag.

@casey
Copy link
Copy Markdown
Owner

casey commented Mar 22, 2026

I switched to using Clap's dynamic completion engine in #3167. The new completion engine calls into the just binary to get completions. This allows us to implement custom completion logic in Rust for all supported shells, instead of having to patch in support for each individual shell.

I created #2406 to track improvements to the new completion engine in one place.

The new completion engine attempts to respect command line flags like --global-justfile as much as possible, so this should work.

@casey casey closed this Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants