-
Notifications
You must be signed in to change notification settings - Fork 222
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
Add color option to CLI #1355
Comments
Hi Max, I'd like to work on this. My thought of the steps for adding the option are:
Please correct me if my understanding is wrong. |
That would be great @Shuozeli ! I think that sounds very reasonable. I would pass a full There's a "smaller" version where we strip out the color at the CLI level, I think that would be easier but less good (but OK!) @aljazerzen lmk if you have any thoughts! |
Hmm, sql does not do any highlighting ATM, so it doesn't need color option (at least for now). But the cli argument would be use to control this param in error formatting. This function is called The best way to do this would be:
|
OK, so we'd have a nested @Shuozeli does that make sense to you? |
Yes, thank you for the clarification. I will be working on this one. |
@Shuozeli Any progress on this? |
This adds `--color` & `--include-signature-comment` options to the `prqlc compile` command. Closes PRQL#1355. I think we did a not-great job at defining the minimum requirements there, to the extent that this is a simpler construction that leans more heavily on external libraries -- and is both simpler and has better functionality as a result. Even without the external libraries, I think we could have suggested a flatter structure to the `Options' struct. (Or maybe we'll decide this construction is too simple / leans too much on external libraries).
* feat(prqlc): Add color & signature_comment options This adds `--color` & `--include-signature-comment` options to the `prqlc compile` command. Closes #1355. I think we did a not-great job at defining the minimum requirements there, to the extent that this is a simpler construction that leans more heavily on external libraries -- and is both simpler and has better functionality as a result. Even without the external libraries, I think we could have suggested a flatter structure to the `Options' struct. (Or maybe we'll decide this construction is too simple / leans too much on external libraries).
Currently the CLI can't take options such as
--color
/--no-color
. Ideally we'd be able pass these, and they would flow through with anOptions
struct to the compiler.A future version could check whether we're in a TTY and default to
--no-color
if so (it's also possible that clap offers something like this?).Labeling as Good first issue (which also make good nth issues). As ever, lots of folks will be happy to answer questions!
The text was updated successfully, but these errors were encountered: