[file_previewer.sh]: Add Java class file previews

This commit is contained in:
2024-09-06 13:56:46 +01:00
parent 3a33fc9208
commit cd8c3fbed4

View File

@ -23,6 +23,9 @@ case "$(mimetype --brief -- "$file")" in
application/vnd.sqlite3)
sqlite3 "$file" "SELECT * FROM sqlite_master WHERE type = 'table';" | bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization;;
application/x-java)
javap "$file" | bat --language=java --theme='base16' --terminal-width "$(($width-4))" --force-colorization;;
application/x-pcapng)
tshark -r "$file" | bat --theme='base16' --terminal-width "$(($width-4))" --force-colorization;; # the --read-file option does not seem to work