It adds support for two new options
* -runArgs (synonym '--) slurps up rest of args and passes them onto run executable as its cmdline args
* -exeArgs (synonym '-X' temporarily ) slurps up rest of args; treats first one as name of executable to run, remainder as its cmdline args.
and TODOs for changes to -ref and -run options
I expect -runArgs to be mostly used via '--' and -exeArgs to be used via '-X';
when -run becomes -r and -r(ef) becomes [something else - -ref, -R,?] , -X/-runArgs can become -run.
giving (Chucks current thinking examples)
- Code: Select all
cobra prog
# compiles and runs foo
# UNCHANGED
cobra prog -- foo bar
# compiles and runs prog, passing foo and bar as arguments
# ++ args passed with '--' (or '-runArgs')
cobra -c prog lib1 lib2
# compiles all. there can be no arguments passed on, because this is compilation only
# AS-IS
cobra lib1 lib2 -X prog foo bar
( will become)
cobra lib1 lib2 -run prog foo bar
# compiles and runs passing everything after prog as arguments (to prog executable)
# of course, nothing prevents you from being explicit:
cobra -X prog
# patch doesnt address this - have to do
# cobra -run prog -- args
# will become -run prog
cobra -c prog