mirror of
https://github.com/youwen5/nixos.git
synced 2025-02-21 03:01:11 -08:00
fix(nushell): use hack to get string escaped completions
Some checks are pending
Check flake / check (push) Waiting to run
Some checks are pending
Check flake / check (push) Waiting to run
This commit is contained in:
parent
b329864e0c
commit
dff03a8f1d
1 changed files with 8 additions and 3 deletions
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue