fix(nushell): use hack to get string escaped completions
Some checks are pending
Check flake / check (push) Waiting to run

This commit is contained in:
Youwen Wu 2025-02-11 14:04:33 -08:00
parent b329864e0c
commit dff03a8f1d
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3

View file

@ -1,7 +1,12 @@
let fish_completer = {|spans|
fish --command $'complete "--do-complete=($spans | str join " ")"'
| from tsv --flexible --noheaders --no-infer
| rename value description
fish --command $'complete --escape "--do-complete=($spans | str join " ")"'
| $"value(char tab)description(char newline)" + $in
| from tsv --flexible --no-infer
| each {|i|
if '\' in $i.value {
$i | merge {'value': $"\"($i.value | str replace -a '\' '')\""}
} else {$i}
}
}
let zoxide_completer = {|spans|