stardot / MatrixBrandy

Matrix Brandy BASIC VI for Linux, Windows, MacOSX
http://brandy.matrixnetwork.co.uk/
44 stars 8 forks source link

Add `--` command-line option #74

Closed bavison closed 4 years ago

bavison commented 4 years ago

This is a common construct in other utilities, and indicates that any subsequent arguments should not be consumed as options to the interpreter. Since Brandy swallows all arguments that start (case-insensitively) with the first one or two characters of options that it recognises, it is otherwise impossible to correctly execute BASIC programs which themselves support options which also match one of these patterns.

For example, a program can't have a -quiet option because it is confused with -quit:

brandy -chain MyProg -quiet No filename was supplied after option '-quiet'

but with this new facility, we can write:

brandy -chain MyProg -- -quiet