From cd8c3fbed401e7c9af85454f80170cb025278932 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 6 Sep 2024 13:56:46 +0100 Subject: [PATCH] [file_previewer.sh]: Add Java class file previews --- file_previewer.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/file_previewer.sh b/file_previewer.sh index cd0b971..70435b8 100755 --- a/file_previewer.sh +++ b/file_previewer.sh @@ -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