[file_previewer.sh]: Add previews for tar.gz files

This commit is contained in:
2024-09-23 02:08:03 +01:00
parent 9fe31ab8d0
commit 0cd0dd5179

View File

@ -21,11 +21,14 @@ case "$(mimetype --brief -- "$file")" in
pdfinfo "$file" | bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization;; pdfinfo "$file" | bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization;;
application/vnd.rar) application/vnd.rar)
unrar l "$file" |bat --language=java --theme='base16' --terminal-width "$(($width-4))" --force-colorization;; unrar l "$file" | bat --language=java --theme='base16' --terminal-width "$(($width-4))" --force-colorization;;
application/vnd.sqlite3) application/vnd.sqlite3)
sqlite3 "$file" "SELECT * FROM sqlite_master WHERE type = 'table';" | bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization;; sqlite3 "$file" "SELECT * FROM sqlite_master WHERE type = 'table';" | bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization;;
application/x-compressed-tar)
tar --list --ungzip --file "$file" | bat --language=java --theme='base16' --terminal-width "$(($width-4))" --force-colorization;;
application/x-java) application/x-java)
javap "$file" | bat --language=java --theme='base16' --terminal-width "$(($width-4))" --force-colorization;; javap "$file" | bat --language=java --theme='base16' --terminal-width "$(($width-4))" --force-colorization;;