diff --git a/CHANGELOG.md b/CHANGELOG.md index c6c5e3c..a101954 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - PowerShell: handle UTF-8 encoding correctly. - Zsh: don't hide output from `chpwd` hooks. - Nushell: upgrade minimum supported version to v0.73.0. +- Zsh: fix extra space in interactive completions when no match is found. +- Fzf: `` now cycles through completions. ## [0.8.3] - 2022-09-02 diff --git a/src/util.rs b/src/util.rs index 8c4c300..2476e7e 100644 --- a/src/util.rs +++ b/src/util.rs @@ -30,7 +30,9 @@ impl Fzf { #[cfg(not(windows))] let mut command = Command::new("fzf"); if multiple { - command.arg("-m"); + command.arg("--multi"); + } else { + command.arg("--bind=tab:down,btab:up"); } command.arg("--nth=2..").stdin(Stdio::piped()).stdout(Stdio::piped()); if let Some(fzf_opts) = config::fzf_opts() { @@ -40,6 +42,7 @@ impl Fzf { // Search result "--no-sort", // Interface + "--cycle", "--keep-right", // Layout "--height=50%", diff --git a/templates/zsh.txt b/templates/zsh.txt index 58679a9..1e0e132 100644 --- a/templates/zsh.txt +++ b/templates/zsh.txt @@ -112,11 +112,7 @@ if [[ -o zle ]]; then # shellcheck disable=SC2296 compadd -Q "${(q-)result}" else -{#- - zsh-autocomplete calls the completion function multiple times if no match is - returned. -#} - compadd "" + return 0 fi \builtin printf '\e[5n' fi