YS-L / csvlens

Command line csv viewer
MIT License
2.49k stars 40 forks source link

To use crossterm #10

Open elferherrera opened 2 years ago

elferherrera commented 2 years ago

Hi. I just found your crate and it seems that it could work very well with nushell. One little issue is the fact that it does use crossterm. Do you think it is possible to have an implementation with crossterm?

YS-L commented 2 years ago

Thanks for reporting! The latest version now uses crossterm. Curious to see how it can be used with nushell.

elferherrera commented 2 years ago

In nushell is needed some sort of data visualiser and csvlens works really nice for it. The fact that it uses crossterm is nice because it can be used in multiple platforms.

fdncred commented 2 years ago

I'm wondering how we can use this. I mean do we shell out and call an external from nushell or is there a crate we can use? I'll have to investigate a bit more. Or, here's an idea, maybe we turn csvlens into an internal command so we can do some | big | pipeline | lens or some such thing?

fMeow commented 1 year ago

It's indeed possible. I often combine ripgrep and csvlens like the following:

$ rg (header|value) my.csv | csvlens