Fish: record Space-Tab selected directory in history
This commit is contained in:
parent
8e47b56895
commit
ed9a035a26
|
|
@ -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).
|
- POSIX: support for non-Cygwin Windows environments (e.g. Busybox).
|
||||||
- Support for RISC-V (riscv64) Linux.
|
- Support for RISC-V (riscv64) Linux.
|
||||||
- `import` now supports fetching entries from `atuin`.
|
- `import` now supports fetching entries from `atuin`.
|
||||||
|
- Fish: record the selected directory in shell history when using interactive
|
||||||
|
Space-Tab completions.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,7 @@ function __zoxide_z_complete
|
||||||
set -l result (command zoxide query --exclude (__zoxide_pwd) --interactive -- $query)
|
set -l result (command zoxide query --exclude (__zoxide_pwd) --interactive -- $query)
|
||||||
and __zoxide_cd $result
|
and __zoxide_cd $result
|
||||||
and builtin commandline --function cancel-commandline repaint
|
and builtin commandline --function cancel-commandline repaint
|
||||||
|
and builtin history append "{{ cmd.unwrap_or("cd") }} "(string escape -- $result) &>/dev/null
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
complete --command __zoxide_z --no-files --arguments '(__zoxide_z_complete)'
|
complete --command __zoxide_z --no-files --arguments '(__zoxide_z_complete)'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue