Add --exit-0 to fzf

So there is no prompt if there is no match
This commit is contained in:
Janek 2021-07-06 13:18:25 +02:00 committed by GitHub
parent 340454b49b
commit 1a6fcbfbe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -14,9 +14,9 @@ impl Fzf {
pub fn new(multiple: bool) -> Result<Self> {
let mut command = Command::new("fzf");
if multiple {
command.arg("-m");
command.arg("--multi");
}
command.arg("-n2..").stdin(Stdio::piped()).stdout(Stdio::piped());
command.arg("--exit-0").arg("-n2..").stdin(Stdio::piped()).stdout(Stdio::piped());
if let Some(fzf_opts) = config::fzf_opts() {
command.env("FZF_DEFAULT_OPTS", fzf_opts);
}