Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lucas-mior opened this issue Apr 27, 2021 · 4 comments
Closed
Labels
enhancement New feature or request

Comments

@lucas-mior
Copy link
Contributor

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.

@lucas-mior
Copy link
Contributor Author

I can think of two possible solutions:

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

@doronbehar
Copy link
Owner

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..

@doronbehar
Copy link
Owner

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.

@lucas-mior
Copy link
Contributor Author

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

doronbehar added a commit that referenced this issue May 13, 2021
Not fixing yet #61, only addressing it a bit.
doronbehar added a commit that referenced this issue May 16, 2021
Not fixing yet #61, only addressing it a bit.
@doronbehar doronbehar changed the title is ModificationTime column useful for archive previews? Archives: Make it possible to configure what columns will be displayed May 16, 2021
@doronbehar doronbehar added the enhancement New feature or request label May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants