You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added qsv lens into my .lessfilter as the following:
*.csv |*.tsv)
qsv lens "$1";;
but when I try less file.csv, the terminal window (I'm using wezterm) stucked in a blank screen until I press 'q' to quit.
I tried csvlens $1 in .lessfilter as well, it gave me the same result (blank screen).
I also tried csvlens --colorful file.csv and qsv lens file.csv directly on the command line. Both works very well with colors. Don't know why they don't work in .lessfilter. The almost full version of my .lessfilter file:
#!/bin/shcase"$1"in*.csv | *.tsv)
qsv lens "$1"
;;
*.iso)
isoinfo -l -i "$1"
;;
*)
# We don't handle this format.exit 127
;;
esac# No further processing by lesspipe necessaryexit 0
I have to confess, I occasionally check how many lines the terminal has, compare that to the number of output lines and then switch off -P depending on the outcome :-)-O
Activity
ondohotola commentedon Jun 18, 2025
I like
csviewwhich (as a specialized tool) has more features thanqsv lensand I have it installed on all my machines anyway.jqnatividad commentedon Jun 20, 2025
Thanks for the detailed report @wx672 .
But if I'm not mistaken,
.lessfilterwill wait for a 0 exit code before proceeding and displaying the contents of the command's stdout.And since both
qsv lensandcsvlensare interactive and won't return an exit code until you quit, you get a blank screen.qsv tableshould work, though its not interactive.Closing this for now. Please feel free to open a new issue to follow up.
ondohotola commentedon Jun 20, 2025
so maybe try
csview -P?I have to confess, I occasionally check how many lines the terminal has, compare that to the number of output lines and then switch off
-Pdepending on the outcome :-)-O