-
-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Labels
breakingThis is a breaking change that requires a major version updateThis is a breaking change that requires a major version updateenhancementTypically new features; lesser priority than bugsTypically new features; lesser priority than bugsrgbasmThis affects RGBASMThis affects RGBASMrgbfixThis affects RGBFIXThis affects RGBFIXrgbgfxThis affects RGBGFXThis affects RGBGFXrgblinkThis affects RGBLINKThis affects RGBLINK
Milestone
Description
Currently, passing @args.txt as one argument will read multiple whitespace-separated arguments from args.txt as if they had been passed directly. The only syntax beyond that is to allow #-prefixed line comments. This means that arguments themselves cannot contain whitespace. You rarely need to, but for some arguments it matters: rgbasm -D greeting="hello world"; rgbfix --title "my new game"; any filesystem path with spaces in it; and so on.
There are some breaking changes we could choose between to allow this:
- Copy Python
argparseand read one argument per line (so newlines would be argument separators but spaces and tabs would not). This would still not allow newlines in arguments, but that is much less likely to be necessary. - Copy Java
javacand allow"double quotes"to enclose arguments with whitespace. This would need more complex syntax, such as\"escapes for arguments with whitespace and double quotes, and we would have to decide how to handle double quotes in the middle of an argument (e.g. how do we parsea"b c"d-- as one argument['a"b c"d'], two['a"b', 'c"d'], or three['a', 'b c', 'd']?).
See https://codeberg.org/ISSOtm/rsgbds/issues/32 for discussion of if/how to make this change in the 2.0 Rust rewrite.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
breakingThis is a breaking change that requires a major version updateThis is a breaking change that requires a major version updateenhancementTypically new features; lesser priority than bugsTypically new features; lesser priority than bugsrgbasmThis affects RGBASMThis affects RGBASMrgbfixThis affects RGBFIXThis affects RGBFIXrgbgfxThis affects RGBGFXThis affects RGBGFXrgblinkThis affects RGBLINKThis affects RGBLINK