TabViewer / tabview

Python curses command line CSV and tabular data viewer
Other
460 stars 49 forks source link

Default to "-w max" if it won't generate any line longer than the current terminal width #142

Closed cirosantilli closed 7 years ago

cirosantilli commented 7 years ago

If no line is longer than terminal width, the better default behavior is to show all full lines, otherwise information is hidden needlessly.

firecat53 commented 7 years ago

Ok, this one took some digging to figure out why I have the default set to a fixed width! In this thread, I determined that for large files, setting the default to mode (and max isn't much faster) was substantially slower on initial startup than using a fixed width. You are correct...it would be better to adjust width of the file to show the max info on one screen. Which is great for smaller files. But working with large files, the startup time was noticeably worse because tabview has to do more processing to scan the entire file first to determine line/column lengths/widths.

So, sorry to close both of your issues un-fixed, but again I'm going to leave the default as-is. If you'd like to change the default for you, you could set alias tabview='tabview -w max. It just depends on what types of files you are working with!

Thanks for the interest!