Use tab to cycle through completions (#496)

This commit is contained in:
Ajeet D'Souza 2022-12-09 01:35:13 +05:30 committed by GitHub
parent e8c5f7a975
commit 82d4f73aae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 6 deletions

View File

@ -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: `<TAB>` now cycles through completions.
## [0.8.3] - 2022-09-02

View File

@ -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%",

View File

@ -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