Repository navigation
doc: add guide to contribute a new command line switch - #728
Merged
Merged
Conversation
Developer howtos exist to add a sub-command or a configuration option but none describes the files to touch when introducing a command line switch, although it involves specific steps that are easy to miss: switch may be parsed either in the main program section or in parseModuleCommandArgs depending on its kind, a sub-command switch must also be registered in the main parser to be accepted before the sub-command name, completion scripts, Nagelfar syntax database and testsuite files have dedicated places for it. Add the add-new-command-line-switch guide covering top-level switches, sub-command switches and the case of an existing switch accepted on an additional sub-command, with example commits for each step. Reference it from the contributing guide, the testsuite guide and the AI assistant instructions. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Developer howtos exist to add a sub-command or a configuration option but none describes the files to touch when introducing a command line switch. This involves steps that are easy to miss: a switch is parsed either in the main program section of
tcl/main.tcl.inor inparseModuleCommandArgsdepending on its kind, a sub-command switch must also be registered in the main parser to be accepted before the sub-command name, and completion scripts, Nagelfar syntax database and testsuite files each have dedicated places for it.This adds the
add-new-command-line-switchdeveloper guide, modeled on the configuration option one. It covers top-level switches, sub-command switches and the case of an existing switch accepted on an additional sub-command (like the recent--tersesupport onwhatisandsearch), with example commits for each step. The guide is referenced from the contributing guide, the testsuite guide and the AI assistant instructions, and the words it introduces are added to the hunspell dictionary.