mirror of
https://github.com/RGBCube/ncc
synced 2025-07-28 18:47:44 +00:00
nushell: fix jc completer
This commit is contained in:
parent
fd49444afe
commit
e3096645a8
1 changed files with 8 additions and 5 deletions
|
@ -30,13 +30,16 @@ def --env "nu-complete jc" [] {
|
||||||
}
|
}
|
||||||
|
|
||||||
let options = try {
|
let options = try {
|
||||||
let options = jc --help
|
let options = ^jc --help
|
||||||
| parse "{_}Options:\n{inherent}\n\nSlice:{_}"
|
| collect
|
||||||
|
| parse "{_}Parsers:\n{_}\n\nOptions:\n{inherent}\n\nSlice:{_}"
|
||||||
| get 0
|
| get 0
|
||||||
|
|
||||||
let parsers = jc --about
|
let parsers = ^jc --about
|
||||||
| from json
|
| from json
|
||||||
| get parsers.argument
|
| get parsers
|
||||||
|
| select argument description
|
||||||
|
| rename value description
|
||||||
|
|
||||||
let inherent = $options.inherent
|
let inherent = $options.inherent
|
||||||
| lines
|
| lines
|
||||||
|
@ -51,7 +54,7 @@ def --env "nu-complete jc" [] {
|
||||||
|
|
||||||
$parsers ++ $inherent
|
$parsers ++ $inherent
|
||||||
} catch {
|
} catch {
|
||||||
null
|
[]
|
||||||
}
|
}
|
||||||
|
|
||||||
$env.__NU_COMPLETE_JC = $options
|
$env.__NU_COMPLETE_JC = $options
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue