Skip to content
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

fix choose #1547

Merged
merged 6 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion man/just.1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ and prints a diff if formatting is required.
.TP
\fB\-\-choose\fR
Select one or more recipes to run using a binary. If `\-\-chooser` is not passed the chooser
defaults to the value of $JUST_CHOOSER, falling back to `fzf`
defaults to the value of $JUST_CHOOSER, falling back to `fzf`()
.TP
\fB\-\-clear\-shell\-args\fR
Clear shell arguments
Expand Down
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ use {
};

// These three strings should be kept in sync:
pub(crate) const CHOOSER_DEFAULT: &str = "fzf --preview 'just --show {}'";
pub(crate) const CHOOSER_DEFAULT: &str = "fzf -m --preview 'just --show {}'";
pub(crate) const CHOOSER_ENVIRONMENT_KEY: &str = "JUST_CHOOSER";
pub(crate) const CHOOSE_HELP: &str = "Select one or more recipes to run using a binary. If \
`--chooser` is not passed the chooser defaults to the value \
of $JUST_CHOOSER, falling back to `fzf`";
of $JUST_CHOOSER, falling back to `fzf`()";
casey marked this conversation as resolved.
Show resolved Hide resolved

#[derive(Debug, PartialEq)]
pub(crate) struct Config {
Expand Down
2 changes: 1 addition & 1 deletion tests/choose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ fn invoke_error_function() {
",
)
.stderr_regex(
r"error: Chooser `/ -cu fzf --preview 'just --show \{\}'` invocation failed: .*\n",
r"error: Chooser `/ -cu fzf -m --preview 'just --show \{\}'` invocation failed: .*\n",
)
.status(EXIT_FAILURE)
.shell(false)
Expand Down