Skip to content

feat(channels): Channel for Justfile recipes #691

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

Merged
merged 2 commits into from
Aug 8, 2025

Conversation

mheuvel-dev
Copy link
Contributor

📺 PR Description

Add a channel to select and preview recipes from a Justfile

Checklist

  • my commits and PR title follow the conventional commits format
  • if this is a new feature, I have added tests to consolidate the feature and prevent regressions
  • if this is a bug fix, I have added a test that reproduces the bug (if applicable)
  • I have added a reasonable amount of documentation to the code where appropriate

@mheuvel-dev
Copy link
Contributor Author

I also added a line in my config.toml, so that this channel is triggered by ctrl-t from command line:

"just-recipes" = ["just"]

In accordance with the contribution guidelines this line is not added to this PR.

command = ["just --summary | tr '[:blank:]' '\n'"]

[preview]
command = "just -s {}"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about running the selection on completion?

[metadata]
name = "just-recipes"
description = "A channel to select recipes from Justfiles"
requirements = ["just"]

[source]
command = ["just --summary | tr '[:blank:]' '\n'"]

[preview]
command = "just -s {}"

[keybindings]
enter = "actions:execute-recipe"

[actions.execute-recipe]
description = "Execute a justfile recipe"
command = "just {}"
mode = "execute"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fast review and the suggestion.

I would prefer a different keybind than enter, for example ctrl-x for execute, because my usual workflow is using ctrl-t for command-line completion. The proposed action is conflicting in that case and may give unintended console output.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! That makes sense, let's make the change and merge this :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already made the change.

Thanks again. I like this tool!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nice, alright let's merge this 🎉

Thanks 🙏

@alexpasmantier
Copy link
Owner

Thanks so much for the contribution!

Added a small suggestion, tell me what you think 😊

@alexpasmantier alexpasmantier merged commit 4b784f7 into alexpasmantier:main Aug 8, 2025
4 of 5 checks passed
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.

2 participants