YS-L / csvlens

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

Feature Request: column-/row- filter as command line parameter #41

Closed kajdo closed 6 months ago

kajdo commented 9 months ago

This is a fantastic tool --- 1000x thx - very well done

would love to see the posibility to add a column filter directly via start parameter, so i can alias some common checks

example 1) csvlens income.csv 2) "" for column filter 3) type ^Rev as regex 4) enter

vs. 1) csvlens -column_filter:"^Rev*" income.csv 2) happy

just an idea

YS-L commented 9 months ago

Thanks for the suggestion! I think it makes sense to have such options.

Are you looking at changing the filter interactively when viewing the file? If not, one alternative that is possible now is to process the file with tools such as qsv first before piping it to csvlens:

qsv select '/^Rev*/' income.csv | csvlens
YS-L commented 6 months ago

Added --columns, --filter, and --find options in v0.7.0.