doronbehar / pistol

General purpose file previewer designed for Ranger, Lf to make scope.sh redundant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Archives: Make it possible to configure what columns will be displayed

lucas-mior opened this issue · comments

Hi,
I find that the Modification Time columns takes up much space and isn't really useful.
I mean, when I go over, say a .zip file, I want to quickly know the contents of it.
Currently I can't see the complete names of the files inside it because of the aforementioned.

I can think of two possible solutions:

  • remove this column
  • reorder columns so that filenames come first

I have thought about this issue in my local TODO for pistol for a while. Ideally, it'd have been best if there was a configuration environment variable such as $PISTOL_ARCHIVE_COLUMNS which would decide which columns would be printed. Regarding the suggested alternatives: The main concern which made me decide to print the file names at the end was that their length which usually is the longest, wouldn't destroy the prettiness of the output. Putting the file names at the beginning and the rest of the info afterwards is a bit harder to do because the maximum length of the filenames should be calculated before you print a single line, if we want to give the effect of a table like output..

We can also not print that column at all since it takes up a lot of space which isn't much of interest, or perhaps to shorten it a little, so only the date would be printed, or perhaps make all of these combinations configurable via an environmental variable.

In anycase, putting the file names to the most right is I think a constraint that we can't avoid, unless we won't mind making pistol slow for big archives.

I see, so I think the configuration via an environmental variable is the best solution.
Although removing UTC info from that column would already make a difference:

2020-11-12 21:30:21 +0000 UTC
2020-11-12 21:30:21