doronbehar / pistol

General purpose file previewer designed for Ranger, Lf to make scope.sh redundant
MIT License
322 stars 7 forks source link

pistol.conf could be better #31

Closed lucas-mior closed 4 years ago

lucas-mior commented 4 years ago

I noticed that parsing of pistol.conf fails when there is more than one space between the mime type and preview program. Which makes the config file really messy.

doronbehar commented 4 years ago

Could you give please a concrete example?

lucas-mior commented 4 years ago

GitHub won't let me put two spaces in a row, I'll try to explain the best I can. inode/directory ls -1A --color %pistol-filename% <-- works, but won't if there is one more space character between directory and ls. It makes easy for errors to occur just because of one extra space character. Also I can't align the mime types / programs properly, making the config file confusing to read and mantain.

doronbehar commented 4 years ago

Thanks for catching that, I improved the config file's parsing, and I hope that works for you. A new release is available.

lucas-mior commented 4 years ago

Indeed, it works now, but I also noticed that empty lines (previously ignored) now break the config parsing. Not a problem for me, but might break someone else's config.

doronbehar commented 4 years ago

It should work now.

https://www.reddit.com/r/ProgrammerHumor/comments/hp9wwp/biggest_lie/

lucas-mior commented 4 years ago

It does, thanks.