summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAjeet D'Souza <98ajeet@gmail.com>2024-03-16 23:09:33 +0530
committerAjeet D'Souza <98ajeet@gmail.com>2024-03-16 23:10:35 +0530
commit94d3cba60e24139319c7d370d796967c607b54ef (patch)
tree94804e16c28e948e40e6b6fc0af59fcfbf5a4fcd
parent5b2c9222f9737a828438b487d9d8fd37f5bba81b (diff)
nushell: handle queries that look like args (#761)
-rw-r--r--CHANGELOG.md2
-rw-r--r--templates/nushell.txt4
2 files changed, 3 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 899316b..8431635 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- fish: detect infinite loop when using `alias cd=z`.
-- fish / PowerShell: handle queries that look like args (e.g. `z -x`).
+- fish / Nushell / PowerShell: handle queries that look like args (e.g. `z -x`).
## [0.9.4] - 2024-02-21
diff --git a/templates/nushell.txt b/templates/nushell.txt
index a5244d6..a934364 100644
--- a/templates/nushell.txt
+++ b/templates/nushell.txt
@@ -39,7 +39,7 @@ if (not ($env | default false __zoxide_hooked | get __zoxide_hooked)) {
#
# Jump to a directory using only keywords.
-def --env __zoxide_z [...rest:string] {
+def --env --wrapped __zoxide_z [...rest:string] {
let arg0 = ($rest | append '~').0
let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) {
$arg0
@@ -53,7 +53,7 @@ def --env __zoxide_z [...rest:string] {
}
# Jump to a directory using interactive search.
-def --env __zoxide_zi [...rest:string] {
+def --env --wrapped __zoxide_zi [...rest:string] {
cd $'(zoxide query --interactive -- ...$rest | str trim -r -c "\n")'
{%- if echo %}
echo $env.PWD