-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chooser: Pass justfile path to preview command for default chooser
The default chooser is fzf, and we pass it a command to generate the preview with "just --show" from the recipe name. This has been working well as long as we rely on the default justfile available in the directory, given that the preview command can find it too. However, passing "--chose" alongside "--justfile" to select a specific file results in the preview command not being able to find the right justfile to process. To address this issue, we turn the const string defining the preview command into a function that takes the internal representation of the justfile as an argument, and updates the preview command with the right file. Fixes: 5f9ac39 ("Use `just --show` in default chooser (#1539)") Suggested-by: Casey Rodarmor <[email protected]>
- Loading branch information
Showing
3 changed files
with
18 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters