|
|
|
@ -23,7 +23,7 @@ let-env config = ($env.config | update hooks.env_change.PWD ($env.config.hooks.e
|
|
|
|
|
def-env __zoxide_z [...rest:string] {
|
|
|
|
|
# `z -` does not work yet, see https://github.com/nushell/nushell/issues/4769
|
|
|
|
|
let arg0 = ($rest | append '~').0
|
|
|
|
|
let path = if (($rest | length) <= 1) && ($arg0 == '-' || ($arg0 | path expand | path type) == dir) {
|
|
|
|
|
let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) {
|
|
|
|
|
$arg0
|
|
|
|
|
} else {
|
|
|
|
|
(zoxide query --exclude $env.PWD -- $rest | str trim -r -c "\n")
|
|
|
|
|