args = argv()
args = argv('user')
| Parameter | Description |
|---|---|
| 'user' | returns only arguments after the command line separator --. |
| Parameter | Description |
|---|---|
| args | a cell array of strings. |
argv() returns a cell array of strings containing the complete Nelson command line arguments.
The first element of the cell array contains the path of the launched executable.
argv('user') returns only the arguments placed after --. The separator itself is not returned.
If the command line does not contain --, argv('user') returns an empty cell array.
When a test is executed by test_run, argv('user') can contain user arguments supplied by the test manager, for example startup control flags placed after --.
Quotes used for grouping command line arguments are handled by the operating system or shell before Nelson starts. Nelson keeps the arguments exactly as received.
argv()
argv('user')
nelson-cli -e "disp(argv('user')); quit" -- "a b" "c d"
| Version | Description |
|---|---|
| 1.0.0 | initial version |