Skip to content

datafusion-cli: implement syntax highlighting for keywords/literals #8701

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
Jefffrey opened this issue Jan 1, 2024 · 4 comments
Open
Labels
enhancement New feature or request

Comments

@Jefffrey
Copy link
Contributor

Jefffrey commented Jan 1, 2024

Is your feature request related to a problem or challenge?

Currently datafusion-cli has no colour. Adding syntax highlighting can improve usability/readability

Describe the solution you'd like

Highlight SQL keywords and literals in different colours, at the minimum

Describe alternatives you've considered

No response

Additional context

Example of duckdb cli:

image

Could be useful: https://docs.rs/rustyline/latest/rustyline/highlight/trait.Highlighter.html

@Jefffrey Jefffrey added the enhancement New feature or request label Jan 1, 2024
@alamb
Copy link
Contributor

alamb commented Jan 1, 2024

This would be awesome

@alamb
Copy link
Contributor

alamb commented Jan 21, 2024

FYI #8918

@alamb
Copy link
Contributor

alamb commented Jan 21, 2024

BTW the other duckdb feature that would be super cool to add to datafusion-cli is the 'duckdb tables' (aka that are formatted nicely based on terminal size and that allow you to scroll left / right)

@SteveLauC
Copy link
Contributor

SteveLauC commented Mar 7, 2024

Hi, this is a really cool feature!

I see that it has been implemented, but I didn't get it with DataFusion cli 36, do I need to enable it somewhere?

image

Update: I get it, it has been disabled by default in #9013, to enable it, one has to use datafusion-cli --color

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants