Skip to content
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

Mispelled flags are mistaken with file names #1505

Open
cg-jl opened this issue Dec 7, 2023 · 0 comments
Open

Mispelled flags are mistaken with file names #1505

cg-jl opened this issue Dec 7, 2023 · 0 comments

Comments

@cg-jl
Copy link
Contributor

cg-jl commented Dec 7, 2023

When mispelling a flag to the compiler, it mistakes it with a file name, which generates a somewhat confusing error message:

$ jakt --cxx-compile-path /opt/bin/clang++-16 test.jakt
Extra unknown argument '/opt/bin/clang++-16', you can only pass one source file (was '--cxx-compile-path')
usage: jakt [cross] [-h] [OPTIONS] <filename>

Perhaps we should assume anything starting with - is an option, so that jakt can complain about non-existing options.
To keep supporting file names that may start with -, we could make use of a marker like -- to signal that flag-like arguments end, so that the next argument is interpreted as a file name, disregarding the - from the start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant