Skip to content

Conversation

camlafit
Copy link

Propose a way to use multiple arguments to call command

Related to #132

@camlafit camlafit force-pushed the command_with_multiple_args branch 2 times, most recently from 3317627 to 7d2417b Compare September 29, 2025 13:11
* Find command when its name use spacing as separator

Purpose is to support approach as namespace/object/action
@camlafit camlafit force-pushed the command_with_multiple_args branch from 7d2417b to 5288c87 Compare September 29, 2025 13:12
* When a command is added , add by cascad all subcommand managed by main command
* Could be useful to load only 'Oject' command and retrieve all its related 'Verb' command
@adhocore
Copy link
Owner

how deep can the subcommands go? i would prefer only 2 levels:

eg. bin cmd subcmd

where cmd is 1st, subcmd is 2nd level

how is 2nd level matched to the pool of commands? i think if 1st level cmd is matched then we can try and see if 2nd level matched to a command

@camlafit
Copy link
Author

Hello

how deep can the subcommands go

Great question :) And I don't know ...

In this PR :

  • As coded, should be infinite as it's a recursive call
  • As tested, it's actually to level as two variables are used (group_name and name)

In my mind

  • should at least three levels to respect namespace, ressources and verb context.

Two variables are used to manage subcommand values. I wish to remove these variables and manage as a recursive concatenation with defined separator. By default colon as actually in base code or space as in this proposition.

@adhocore
Copy link
Owner

ya upto 3 seems good: "cmd subcmd action"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants