diff --git a/CHANGELOG.md b/CHANGELOG.md index 17809f9..f531604 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - fish: detect infinite loop when using `alias cd=z`. - fish / Nushell / PowerShell: handle queries that look like args (e.g. `z -x`). - zsh: better cd completions. +- elvish: `z -` now work as expected. - Lazily delete excluded directories from the database. ## [0.9.4] - 2024-02-21 diff --git a/templates/elvish.txt b/templates/elvish.txt index 1f48a91..3de0e1d 100644 --- a/templates/elvish.txt +++ b/templates/elvish.txt @@ -22,7 +22,7 @@ fn __zoxide_cd {|path| # Initialize hook to track previous directory. var oldpwd = $builtin:pwd -set builtin:before-chdir = [$@builtin:before-chdir {|_| edit:add-var oldpwd $builtin:pwd }] +set builtin:before-chdir = [$@builtin:before-chdir {|_| set oldpwd = $builtin:pwd }] # Initialize hook to add directories to zoxide. {%- if hook == InitHook::None %}