Pass (argc, argv) in Shell interface
The main advantages of using (argc, argv) over a single string CommandLine are:
- Avoid all the hassle of strdup/strtok.
- Deal with command line argument containing white spaces correctly.
- Make integrating with 3rd party library wuch as https://github.com/argtable/argtable3 easier.
Originally posted by @PengZheng in https://github.com/apache/celix/pull/476#discussion_r1111655952
I think this can be done by introducing a new shell command interface (v2) based on the current one: https://github.com/apache/celix/blob/rel/celix-2.3.0/bundles/shell/shell/api/celix_shell_command.h
We currently already support 2 shell commands version and if we remove the current deprecated version ( https://github.com/apache/celix/blob/rel/celix-2.3.0/bundles/shell/shell/deprecated_api/command.h) when preparing for a Apache Celix 3.0.0 we could introduce a argc/argv variant and deprecated celix_shell_command.h.