diff --git a/CHANGELOG.md b/CHANGELOG.md index 207fce7..a33d039 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bash: avoid blanking the prompt when cancelling interactive Space-Tab completions. - Bash/Fish/Zsh: avoid drawing a new line when Space-Tab completion finds no matches. - Tcsh: preserve any existing `precmd` alias instead of overwriting it. +- Nushell: complete only directories for `z`, instead of all files. ## [0.9.9] - 2026-01-31 diff --git a/templates/nushell.txt b/templates/nushell.txt index 9338d4e..2cf358a 100644 --- a/templates/nushell.txt +++ b/templates/nushell.txt @@ -56,7 +56,7 @@ export-env { # # Jump to a directory using only keywords. -export def --env --wrapped __zoxide_z [...rest: string] { +export def --env --wrapped __zoxide_z [...rest: directory] { let path = match $rest { [] => {'~'}, [ '-' ] => {'-'}, @@ -72,7 +72,7 @@ export def --env --wrapped __zoxide_z [...rest: string] { } # Jump to a directory using interactive search. -export def --env --wrapped __zoxide_zi [...rest:string] { +export def --env --wrapped __zoxide_zi [...rest: string] { cd $'(^zoxide query --interactive -- ...$rest | str trim -r -c "\n")' {%- if echo %} echo $env.PWD