16 lines
358 B
Bash
Executable File
16 lines
358 B
Bash
Executable File
#!/bin/sh
|
|
case "$1" in
|
|
*.tar*) tar tf "$1";;
|
|
*.zip) unzip -l "$1";;
|
|
*.rar) unrar l "$1";;
|
|
*.7z) 7z l "$1";;
|
|
*.pdf) pdftotext "$1" -;;
|
|
*.jpg) img2txt "$1";;
|
|
*.jpeg) img2txt "$1";;
|
|
*.png) img2txt "$1";;
|
|
*.gif) img2txt "$1";;
|
|
*.bmp) img2txt "$1";;
|
|
*.md) mdcat "$1";;
|
|
*) bat --terminal-width 120 --wrap auto --color always --theme base16 "$1";;
|
|
esac
|