From e3096645a875cd6960ed0fbd363f591c354e77fc Mon Sep 17 00:00:00 2001 From: RGBCube Date: Fri, 18 Jul 2025 22:43:39 +0300 Subject: [PATCH] nushell: fix jc completer --- modules/common/nushell/config.nu | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/common/nushell/config.nu b/modules/common/nushell/config.nu index 1cc1ae3..4edf0fd 100644 --- a/modules/common/nushell/config.nu +++ b/modules/common/nushell/config.nu @@ -30,13 +30,16 @@ def --env "nu-complete jc" [] { } let options = try { - let options = jc --help - | parse "{_}Options:\n{inherent}\n\nSlice:{_}" + let options = ^jc --help + | collect + | parse "{_}Parsers:\n{_}\n\nOptions:\n{inherent}\n\nSlice:{_}" | get 0 - let parsers = jc --about + let parsers = ^jc --about | from json - | get parsers.argument + | get parsers + | select argument description + | rename value description let inherent = $options.inherent | lines @@ -51,7 +54,7 @@ def --env "nu-complete jc" [] { $parsers ++ $inherent } catch { - null + [] } $env.__NU_COMPLETE_JC = $options