From 1f058a345f0d7afbe4b86b61b1b465fe413bebc0 Mon Sep 17 00:00:00 2001 From: Shohei YOSHIDA Date: Sun, 8 Mar 2026 22:55:10 +0900 Subject: [PATCH] fix tsc completion - set '-C' flag of _arguments - remove duplicated flags --- src/_tsc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/_tsc b/src/_tsc index 4fc3225..e1f0084 100644 --- a/src/_tsc +++ b/src/_tsc @@ -34,6 +34,9 @@ # # ------------------------------------------------------------------------------ +typeset -A opt_args +local context state line + local -a module_types=( none commonjs amd umd system es6/es2015 es2020 es2022 esnext node16 node18 nodenext preserve ) @@ -197,7 +200,7 @@ local -a opts=( if (( $+opt_args[--build] )); then opts+=( '(-v --verbose)'{-v,--verbose}"[Enable verbose logging]" - '(-d --dry)'{-d,--dry}'[Show what would be built]' + '--dry[Show what would be built]' '(-f --force)'{-f,--force}'[Build all projects, including those that appear to be up to date]' '--clean[Delete the outputs of all projects]' '--stopBuildOnErrors[Skip building downstream projects on error in upstream project]' @@ -208,7 +211,7 @@ else ) fi -_arguments $opts && return 0 +_arguments -C $opts && return 0 # Local Variables: # mode: Shell-Script