Zsh: avoid trailing space when cancelling interactive completions

This commit is contained in:
Ajeet D'Souza 2026-06-30 01:32:11 +05:30
parent faa8df63f3
commit e4b82c0598
2 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- PowerShell: use fully qualified names when invoking cmdlets. - PowerShell: use fully qualified names when invoking cmdlets.
- Bash/Fish/POSIX/Zsh: resolve symlinks on Windows. - Bash/Fish/POSIX/Zsh: resolve symlinks on Windows.
- Zsh: avoid inserting a trailing space when cancelling interactive Space-Tab completions.
## [0.9.9] - 2026-01-31 ## [0.9.9] - 2026-01-31

View File

@ -147,7 +147,7 @@ if [[ -o zle ]]; then
__zoxide_result="$(\command zoxide query --exclude "$(__zoxide_pwd || \builtin true)" --interactive -- ${words[2,-1]})" || __zoxide_result='' __zoxide_result="$(\command zoxide query --exclude "$(__zoxide_pwd || \builtin true)" --interactive -- ${words[2,-1]})" || __zoxide_result=''
# Set a result to ensure completion doesn't re-run # Set a result to ensure completion doesn't re-run
compadd -Q "" compadd -Q -S "" -- ""
# Bind '\e[0n' to helper function. # Bind '\e[0n' to helper function.
\builtin bindkey '\e[0n' '__zoxide_z_complete_helper' \builtin bindkey '\e[0n' '__zoxide_z_complete_helper'