From cf34d02288da6def37bbeaa2eee9105ac49ad684 Mon Sep 17 00:00:00 2001 From: Ajeet D'Souza <98ajeet@gmail.com> Date: Fri, 16 Feb 2024 02:31:47 +0530 Subject: [PATCH] --cmd cd works on all shells --- README.md | 2 +- templates/nushell.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e46d2d6..db8d5e8 100644 --- a/README.md +++ b/README.md @@ -372,7 +372,7 @@ When calling `zoxide init`, the following flags are available: - `--cmd` - Changes the prefix of the `z` and `zi` commands. - `--cmd j` would change the commands to (`j`, `ji`). - - `--cmd cd` would replace the `cd` command (doesn't work on Nushell / POSIX shells). + - `--cmd cd` would replace the `cd` command. - `--hook ` - Changes how often zoxide increments a directory's score: | Hook | Description | diff --git a/templates/nushell.txt b/templates/nushell.txt index d5a193a..a5244d6 100644 --- a/templates/nushell.txt +++ b/templates/nushell.txt @@ -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 __zoxide_zi [...rest:string] { cd $'(zoxide query --interactive -- ...$rest | str trim -r -c "\n")' {%- if echo %} echo $env.PWD