fix: nushell: temporarily remove typing due to a bug in nu

This commit is contained in:
Maxim Onciul 2023-07-26 15:17:26 +02:00
parent 6a2a727f05
commit 5b7bd959b1
1 changed files with 5 additions and 3 deletions

View File

@ -39,9 +39,10 @@ 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 __zoxide_z [...rest:string] {
def-env __zoxide_z [...rest] {
let arg0 = ($rest | append '~').0
let path = if (($rest | str length) <= 1) and ($arg0 == '-' or ($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")
@ -53,7 +54,8 @@ 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] {
def-env __zoxide_zi [...rest] {
cd $'(zoxide query --interactive -- $rest | str trim -r -c "\n")'
{%- if echo %}
echo $env.PWD