YS-L / csvlens

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

Feature request: Sorting #35

Closed da2r-20 closed 6 months ago

da2r-20 commented 1 year ago

First of all great project! Is it possible to add a sorting per-column (regular sort and natural)

YS-L commented 1 year ago

Hello! For now I intended csvlens to be a simple viewer / pager, so sorting seems a bit out of scope. Would using other tools such as qsv for sorting and then piping to csvlens work for your case?

kleinmatic commented 8 months ago

Just wanted to add a quick upvote to the idea of column sorting. It would very much increase the utility of this, which is already great! I often open csv's to do some quick data-distribution assessments, which is to say, I look for column min/maxes. Being able to do this interactively, especially in cases where I don't know the column labels before I open it, would be very helpful.

Thanks for making this!

YS-L commented 6 months ago

Thanks for the suggestions! I can see the value of being able to do sorting interactively. I added an experimental sorting option in the main branch (key binding: Shift + ↓ or Shift + j). Feel free to try it and let me know what you think!