Closed cabrrtt closed 1 year ago
Interesting! Haven't thought of piping on from csvlens. Do you mean echoing the value of a particular cell in the table?
Yes, just that. To illustrate, instead of this using fzf:
ps | to csv | fzf | split row ',' | get 0 | kill $in
You might do
ps | to csv | csvlens --echo-column pid | kill $in
Or perhaps that would more logically be --echo-cell
I like the option --echo-column
. Just added that in the main branch.
Just built and tested. This works great @YS-L. Thanks!
Thanks for this feature! Would you consider an adaptation to allow piping through, so that there's no interactive session, rather emits to stdout immediately?
It would be nice if this selection can be done inside csvlens. That one can select a column or a cell and then return the values as a comma separated string
@miketheman Could you show an example usage without interactivity? csvlens is intended for interactive usage, so I suspect there might be better tools for that purpose.
@YS-L my example was largely intended for a packaging/testing purpose and automated testing that the compiled binary functions correctly without a human confirmation 😁
It would be nice if this selection can be done inside csvlens. That one can select a column or a cell and then return the values as a comma separated string
@elferherrera Yes, that makes a lot of sense. Supporting column and cell selection is one of the improvements that I plan to implement.
Loving csvlens @YS-L. Like @elferherrera suggested, I'm finding this an perfect partner to nushell to browse through csv such as:
What I would love to be able to do is to pipe on from csvlens, meaning that csvlens can take a switch to echo a named column from the selected row on exit. Kind of like a columnar fzf