1
Fork 0
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:
RGBCube 2025-07-18 22:43:39 +03:00
parent fd49444afe
commit e3096645a8
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M

View file

@ -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