Fish: record Space-Tab selected directory in history

This commit is contained in:
Ajeet D'Souza 2026-06-30 02:15:25 +05:30
parent 8e47b56895
commit ed9a035a26
2 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- POSIX: support for non-Cygwin Windows environments (e.g. Busybox).
- Support for RISC-V (riscv64) Linux.
- `import` now supports fetching entries from `atuin`.
- Fish: record the selected directory in shell history when using interactive
Space-Tab completions.
### Changed

View File

@ -103,6 +103,7 @@ function __zoxide_z_complete
set -l result (command zoxide query --exclude (__zoxide_pwd) --interactive -- $query)
and __zoxide_cd $result
and builtin commandline --function cancel-commandline repaint
and builtin history append "{{ cmd.unwrap_or("cd") }} "(string escape -- $result) &>/dev/null
end
end
complete --command __zoxide_z --no-files --arguments '(__zoxide_z_complete)'