Closed nkh closed 1 year ago
What kind of archives would you like to view with moar
?
any compressed file but if the compressed file contains other files then a listing should be displayed, it sounds more logical than a binary dump. if it's a single file, eg: not an archive, showing a binary dump is still not very useful, on the other hand text files could be shown. it's up to you, I look at compressed files i my own viewer.
I look at compressed files i my own viewer
I think I'll postpone this until there's a clearer ask.
Feel free to reopen / question this if you feel I'm taking the wrong decision here!
I must have misunderstood the documentation : Automatic decompression of compressed files (.gz, .bz2, .xz)
I thought that was already implemented!
This works, and will show the same thing as moar /etc/passwd
:
gzip --stdout < /etc/passwd > passwd.gz
moar passwd.gz
IIUC your expectation is that if I moar something.tar.gz
, moar
should:
2 is not implemented.
Do you think this should be clarified in the README?
2 is what expected; I guess other will so it may be a good idea to clarify in the docs
That clarifies things, reopening!
@nkh do you think this new phrasing is better?
New
- Automatic decompression when viewing compressed text files (
.gz
,.bz2
,.xz
)
Old
- Automatic decompression of compressed files (
.gz
,.bz2
,.xz
)
IMHO, if the compressed file contains multiple files a listing should be displayed not binary data. the same goes for content that is a single file, if it is not a text file, which might include ANSI code, it should not be displayed at least without asking the user, there are better ways to look at binary, maybe a hex dump would be more useful.