about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorMarlyn <marlyn@marlyn.cloud>2021-09-11 19:28:51 -0600
committerMarlyn <marlyn@marlyn.cloud>2021-09-11 19:58:53 -0600
commitb3a1da9d5b7f93fde88b745362e68217a43bb647 (patch)
treec2995d3c48e225f13dff5be9b5523dcdb8585b74 /ranger
parent6f3a6006a0cd074a550e645383c7240d2d97f1ef (diff)
downloadranger-b3a1da9d5b7f93fde88b745362e68217a43bb647.tar.gz
Adds a preview for ELF files using readelf
Diffstat (limited to 'ranger')
-rwxr-xr-xranger/data/scope.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh
index e046d6da..9b1035a8 100755
--- a/ranger/data/scope.sh
+++ b/ranger/data/scope.sh
@@ -339,6 +339,11 @@ handle_mime() {
             mediainfo "${FILE_PATH}" && exit 5
             exiftool "${FILE_PATH}" && exit 5
             exit 1;;
+            
+        ## ELF files (executables and shared objects)
+        application/x-executable | application/x-pie-executable | application/x-sharedlib)
+            readelf -WCa "${FILE_PATH}" && exit 5
+            exit 1;;
     esac
 }