New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ChucK mistaking directory delimiters for escape characters on Windows. #90
Comments
Hmm, it seems it's this chunk in util_string.cpp that is the part of the issue, which only runs if there is a
It seems like we're stopping ChucK from loading a file if it encounters an escape sequence in the command, I'm unsure of how we can accommodate both loading a command with backslaches (for example, the command |
This is actually a pretty big historical disaster area in ChucK and has been changed/redesigned/fixed several times in the face of competing priorities/demands. Basically ChucK uses : as a separator for command line arguments to individual scripts (e.g. It becomes even more fun when, on Windows, you want to run a script that takes a ChucK file passed as a command line argument and exports it to a WAV file passed as a command line argument. This is how miniAudicle Export works: by running as a subprocess e.g. chuck is still usable on the command line in Windows; you have to use |
From what you're saying, it seems that the only way correct this in a manner that would be acceptable on other platforms would be to change the method in which command line arguments are separated (e.g. using spaces instead of colons). But this big of a change doesn't sound likely without some considerable effort as well as a consensus from the ChucK community, so I won't pin my hopes on it. The main driver for me on this issue was being able to run a ChucK shred from inside of an alternative IDE, and the manner in which a ChucK plugin would determine the path of the buffer was prohibiting that (as it would default to Windows type pathing), but there are workarounds for those issues. |
Alternative IDE support is probably a bigger priority than pure command line support, so if any other ideas come up that don't involve big user-facing changes, Im all ears. |
On Windows using CMD or PowerShell, ChucK seems to mistake directory delimiters for escape characters. This is especially tricky when autocomplete in these environments always prefixes the current directory
.\
, so a\
combined with the first letter of ChucK file is mistaken for an escape character.This error is only present on Windows as far as I can tell, it is not present on OSX.
EDIT: Turns out I'm incorrect about it not being present on OSX. Prefixing
.\
when running ChucK from terminal does not work (and I suppose it shouldn't).The text was updated successfully, but these errors were encountered: