about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-09-12 17:50:00 +0200
committertoonn <toonn@toonn.io>2021-09-12 17:50:00 +0200
commitd617dd20819a0a3222f998b307705bad7ee0985e (patch)
treec2995d3c48e225f13dff5be9b5523dcdb8585b74
parent6f3a6006a0cd074a550e645383c7240d2d97f1ef (diff)
parentb3a1da9d5b7f93fde88b745362e68217a43bb647 (diff)
downloadranger-d617dd20819a0a3222f998b307705bad7ee0985e.tar.gz
Merge remote-tracking branch 'marlyn-x86/feature/preview_elf_files'
-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
 }