Last active
May 24, 2019 10:18
-
-
Save elhenro/e3c6e9d0104c030654bc187be2e83a33 to your computer and use it in GitHub Desktop.
lf preview script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
case "$1" in | |
*.jpg) feh "$1";; | |
*.tar*) tar tf "$1";; | |
*.zip) unzip -l "$1";; | |
*.rar) unrar l "$1";; | |
*.7z) 7z l "$1";; | |
*.pdf) pdftotext "$1" -;; | |
*) highlight -O ansi "$1" || cat "$1";; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment