argv
Nelson command line arguments.
📝Syntax
args = argv()
args = argv('user')
📥Input Arguments
Parameter Description
'user' returns only arguments after the command line separator --.
📤Output Arguments
Parameter Description
args a cell array of strings.
📄Description

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.

💡Examples
argv()
argv('user')
nelson-cli -e "disp(argv('user')); quit" -- "a b" "c d"
🔗See Also
executable
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub