From 0a36da8326ffe440b0d7e983cd0cac1267809ce3 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sat, 19 Jul 2025 00:06:31 +0300 Subject: [PATCH] jc: only show --options if commandline ends with - --- modules/jc/mod.nu | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/jc/mod.nu b/modules/jc/mod.nu index 4e8a497..2a1241a 100644 --- a/modules/jc/mod.nu +++ b/modules/jc/mod.nu @@ -1,4 +1,4 @@ -def --env "nu-complete jc" [] { +def --env "nu-complete jc" [commandline: string] { try { let about = ^jc --about | from json @@ -30,7 +30,11 @@ def --env "nu-complete jc" [] { } | flatten - $options ++ $inherent ++ $magic + $magic ++ if ($commandline | str ends-with "-") { + $options ++ $inherent + } else { + [] + } } catch { [] }