fish: display and run the selected command in Space-Tab
This commit is contained in:
parent
7a2094a59e
commit
6f79755f1a
|
|
@ -15,8 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- `import` now supports fetching entries from `atuin`.
|
||||
- `import` now skips directories matching `$_ZO_EXCLUDE_DIRS`.
|
||||
- POSIX: support for non-Cygwin Windows environments (e.g. Busybox).
|
||||
- Fish: record the selected directory in shell history when using interactive
|
||||
Space-Tab completions.
|
||||
- Fish: Space-Tab completions now display and run the selected command.
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
|||
|
|
@ -101,9 +101,8 @@ function __zoxide_z_complete
|
|||
# If the last argument is empty, use interactive selection.
|
||||
set -l query $tokens[2..-1]
|
||||
set -l result (command zoxide query --exclude (__zoxide_pwd) --interactive -- $query 2>/dev/null)
|
||||
and __zoxide_cd $result
|
||||
and builtin commandline --function cancel-commandline repaint
|
||||
and builtin history append "{{ cmd.unwrap_or("cd") }} "(string escape -- $result) &>/dev/null
|
||||
and builtin commandline --replace -- "{{ cmd.unwrap_or("cd") }} "(string escape -- $result)
|
||||
and builtin commandline --function repaint execute
|
||||
end
|
||||
end
|
||||
complete --command __zoxide_z --no-files --arguments '(__zoxide_z_complete)'
|
||||
|
|
|
|||
Loading…
Reference in New Issue