Context
Every other command uses the global -o/--output flag for output format (table, json, yaml, csv). cu export tasks redefines -o as the output file path, so users who learned -o json elsewhere end up with a file literally named json in their working directory instead of JSON on stdout.
Evidence
internal/cmd/export.go — export tasks binds -o/--output to the destination file path, shadowing the global format flag.
- Global flag (root command):
-o, --output selects the output format across the rest of the CLI.
- Repro:
cu export tasks -o json writes a file named json rather than emitting JSON.
Suggested fix
Rename export's file flag to --file/-F (keeping --format for the export format), and let the global -o retain its format meaning. If backward compatibility matters, accept the old spelling for a deprecation window with a warning.
Context
Every other command uses the global
-o/--outputflag for output format (table,json,yaml,csv).cu export tasksredefines-oas the output file path, so users who learned-o jsonelsewhere end up with a file literally namedjsonin their working directory instead of JSON on stdout.Evidence
internal/cmd/export.go—export tasksbinds-o/--outputto the destination file path, shadowing the global format flag.-o, --outputselects the output format across the rest of the CLI.cu export tasks -o jsonwrites a file namedjsonrather than emitting JSON.Suggested fix
Rename export's file flag to
--file/-F(keeping--formatfor the export format), and let the global-oretain its format meaning. If backward compatibility matters, accept the old spelling for a deprecation window with a warning.