feat: rename --from/--to flags to --input/--output (#42)
## Description The `convert` and `reduce` commands used `--from` and `--to` flags to specify input/output representations. These names are ambiguous and don't clearly describe what they control. This PR renames them to `--input`/`--output` and adds `-i`/`-o` short aliases for convenience. - Rename `--from` to `--input` (`-i`) in `convert` and `reduce` commands. - Rename `--to` to `--output` (`-o`) in the `convert` command. - Switch from `StringVar` to `StringVarP` to support the new short flags. ## Benefits - Flag names now clearly indicate they refer to representations, not file paths. - Short aliases `-i` and `-o` make CLI usage more concise. ## Checklist - [x] Code follows conventional commit format. - [x] Branch follows naming convention (`<type>/<description>`). Always use underscores. - [x] Tests pass (if applicable). - [ ] Documentation updated (if applicable). Reviewed-on: #42 Co-authored-by: M.V. Hutz <git@maximhutz.me> Co-committed-by: M.V. Hutz <git@maximhutz.me>
This commit was merged in pull request #42.
This commit is contained in:
@@ -87,8 +87,8 @@ func LambdaConvert() *cobra.Command {
|
||||
},
|
||||
}
|
||||
|
||||
cmd.Flags().StringVar(&inputReprFlag, "from", "", "Input representation (inferred from extension if unset)")
|
||||
cmd.Flags().StringVar(&outputReprFlag, "to", "", "Output representation (inferred from extension if unset)")
|
||||
cmd.Flags().StringVarP(&inputReprFlag, "input", "i", "", "Input representation (inferred from extension if unset)")
|
||||
cmd.Flags().StringVarP(&outputReprFlag, "output", "o", "", "Output representation (inferred from extension if unset)")
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ func LambdaReduce() *cobra.Command {
|
||||
},
|
||||
}
|
||||
|
||||
cmd.Flags().StringVar(&inputReprFlag, "from", "", "Input representation (inferred from extension if unset)")
|
||||
cmd.Flags().StringVarP(&inputReprFlag, "input", "i", "", "Input representation (inferred from extension if unset)")
|
||||
cmd.Flags().StringVarP(&engineFlag, "engine", "e", "", "Reduction engine (inferred from '--input' if unset)")
|
||||
|
||||
return cmd
|
||||
|
||||
Reference in New Issue
Block a user