Parse command-line arguments: Difference between revisions

Line 443:
Usage in shell:
<lang shell>
$> function -c --wwxx arg1 arg2
</lang>
Note that this works in Powershell. All of the arguments after the function name will be passed as strings to the function, which then calls them as an array with the automatic variable, $args. The custom parser/function does the work from there, turning the strings into flags and typed arguments. WARNING: This is reinventing the wheel to an extreme degree.
Anonymous user