Add support for MacOS Mach-O and .dylib files

Closes MidnightCommander/mc#164.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Oleg Kharitonov 2021-06-07 09:13:03 +02:00 committed by Andrew Borodin
parent 482e183190
commit 6a9ad25e44
2 changed files with 12 additions and 0 deletions

View File

@ -35,6 +35,9 @@ do_view_action() {
elf) elf)
file "${MC_EXT_FILENAME}" && nm -C "${MC_EXT_FILENAME}" file "${MC_EXT_FILENAME}" && nm -C "${MC_EXT_FILENAME}"
;; ;;
dylib)
file "${MC_EXT_FILENAME}" && nm -n "${MC_EXT_FILENAME}"
;;
dbf) dbf)
dbview -b "${MC_EXT_FILENAME}" dbview -b "${MC_EXT_FILENAME}"
;; ;;

View File

@ -455,6 +455,11 @@ Include=editor
Regex=\.(so|so\.[0-9\.]*)$ Regex=\.(so|so\.[0-9\.]*)$
View=%view{ascii} @EXTHELPERSDIR@/misc.sh view so View=%view{ascii} @EXTHELPERSDIR@/misc.sh view so
# .dylib libraries
[dylib]
Regex=\.(dylib|dylib\.[0-9\.]*)$
View=%view{ascii} @EXTHELPERSDIR@/misc.sh view dylib
### Documentation ### ### Documentation ###
@ -893,6 +898,10 @@ Type=^ELF
#Open=%var{PAGER:more} %f #Open=%var{PAGER:more} %f
View=%view{ascii} @EXTHELPERSDIR@/misc.sh view elf View=%view{ascii} @EXTHELPERSDIR@/misc.sh view elf
[Mach-O]
Type=^Mach-O
#Open=%var{PAGER:more} %f
View=%view{ascii} @EXTHELPERSDIR@/misc.sh view dylib
### Documentation ### ### Documentation ###