1 # Midnight Commander 3.0 extension file
2 # Warning: Structure of this file has changed completely with version 3.0
4 # All lines starting with # or empty lines are thrown away.
5 # Lines starting in the first column should have following format:
7 # keyword/descNL, i.e. everything after keyword/ until new line is desc
11 # shell (desc is, when starting with a dot, any extension (no wildcars),
12 # i.e. matches all the files *desc . Example: .tar matches *.tar;
13 # if it doesn't start with a dot, it matches only a file of that name)
15 # shell/i (desc is, when starting with a dot, any extension (no wildcars),
16 # The same as shell but with case insensitive.
18 # regex (desc is an extended regular expression)
19 # Please note that we are using the GNU regex library and thus
20 # \| matches the literal | and | has special meaning (or) and
21 # () have special meaning and \( \) stand for literal ( ).
23 # regex/i (desc is an extended regular expression)
24 # The same as regex but with case insensitive.
26 # type (file matches this if `file %f` matches regular expression desc
27 # (the filename: part from `file %f` is removed))
28 # Ignored if the "file" utility isn't used (not found in configure
29 step or disabled in ini file).
31 # type/i (file matches this if `file %f` matches regular expression desc)
32 # The same as type but with case insensitive.
34 # directory (matches any directory matching regular expression desc)
36 # include (matches an include directive)
38 # default (matches any file no matter what desc is)
40 # Other lines should start with a space or tab and should be in the format:
42 # keyword=commandNL (with no spaces around =), where keyword should be:
44 # Open (if the user presses Enter or doubleclicks it),
46 # View (F3), Edit (F4)
48 # Include is the keyword used to add any further entries from an include/
51 # command is any one-line shell command, with the following substitutions:
54 # %p -> name of the current file (without path, but pwd is its path).
55 # Also provided to external application as MC_EXT_BASENAME
57 # %f -> name of the current file. Unlike %p, if file is located on a
58 # non-local virtual filesystem, i.e. either tarfs or ftpfs,
59 # then the file will be temporarily copied into a local directory
60 # and %f will be the full path to this local temporal file.
61 # If you don't want to get a local copy and want to get the
62 # virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then
63 # use %d/%p instead of %f.
64 # Also provided to external application as MC_EXT_FILENAME
66 # %d -> name of the current directory (pwd, without trailing slash)
67 # Also provided to external application as MC_EXT_CURRENTDIR
69 # %s -> "selected files", i.e. space separated list of tagged files if any
70 # or name of the current file.
71 # Also provided to external application as MC_EXT_SELECTED
73 # %t -> list of tagged files
74 # Also provided to external application as MC_EXT_ONLYTAGGED
76 # %u -> list of tagged files (they'll be untaged after the command)
78 # (If these 6 letters are in uppercase, they refer to the other panel.
79 # But you shouldn't have to use it in this file.)
82 # %cd -> the rest is a path mc should change into (cd won't work, since it's
83 # a child process). %cd handles even vfs names.
85 # %view -> the command you type will be piped into mc's internal file viewer
86 # if you type only the %view and no command, viewer will load %f file
87 # instead (i.e. no piping, so it is different to %view cat %f)
88 # %view may be directly followed by {} with a list of any of
89 # ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for
90 # text using backspace for bold and underscore) and unform
91 # (no highlighting for nroff sequences) separated by commas.
93 # %var -> You use it like this: %var{VAR:default}. This macro will expand
94 # to the value of the VAR variable in the environment if it's set
95 # otherwise the value in default will be used. This is similar to
96 # the Bourne shell ${VAR-default} construct.
98 # Rules are applied from top to bottom, thus the order is important.
99 # If some actions are missing, search continues as if this target didn't
100 # match (i.e. if a file matches the first and second entry and View action
101 # is missing in the first one, then on pressing F3 the View action from
102 # the second entry will be used. default should catch all the actions.
104 # Any new entries you develop for you are always welcome if they are
105 # useful on more than one system. You can post your modifications
106 # as tickets at www.midnight-commander.org
111 # Reorganization: 2012-03-07 Slava Zanko <slavazanko@gmail.com>
112 # 2021-03-28 Andrew Borodin <aborodin@vmail.ru>
113 # 2021-08-24 Tomas Szepe <szepe@pinerecords.com>
119 Open=%cd %p/changesetfs://
120 View=%cd %p/patchsetfs://
124 # Since we use "file -z", we should use regex/ and shell/ at first, then type/.
126 # .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk, .gem
127 regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$|\.gem$
129 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.gz
132 # Open=%cd %p/utar://
133 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.bzip
135 regex/\.t(ar\.bz2|bz2?|b2)$
137 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.bzip2
140 regex/\.t(ar\.lzma|lz)$
142 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lzma
147 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lz
150 regex/\.t(ar\.lz4|lz4)$
152 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lz4
155 regex/\.t(ar\.xz|xz)$
157 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.xz
160 regex/\.t(ar\.zst|zst)$
162 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.zst
164 # .tar.F - used in QNX
166 # Open=%cd %p/utar://
167 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.F
169 # .qpr/.qpk - QNX Neutrino package installer files
172 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.qpr
177 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar
180 regex/i/\.a(rj|[0-9][0-9])$
182 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view arj
187 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cab
192 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view ha
195 regex/i/\.r(ar|[0-9][0-9])$
197 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view rar
202 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view alz
207 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.z
211 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.lz
215 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.lz4
219 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.xz
223 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.zst
227 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.gz
231 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio
234 regex/^(initramfs.*\.img|initrd(-.+)?\.img(-.+)?)$
236 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio
238 # 7zip archives (they are not man pages)
241 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view 7z
244 regex/\.(diff|patch)(\.bz2)$
245 Open=%cd %p/patchfs://
246 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
248 regex/\.(diff|patch)(\.(gz|Z))$
249 Open=%cd %p/patchfs://
250 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
252 regex/\.(diff|patch)(\.xz)$
253 Open=%cd %p/patchfs://
254 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view xz
256 regex/\.(diff|patch)(\.zst)$
257 Open=%cd %p/patchfs://
258 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zst
261 regex/(^|\.)ls-?lR(\.gz|Z|bz2)$
267 View=%view{ascii} @EXTHELPERSDIR@/package.sh view trpm
269 # RPM packages (SuSE uses *.spm for source packages)
270 regex/\.(src\.rpm|spm)$
272 View=%view{ascii} @EXTHELPERSDIR@/package.sh view src.rpm
276 View=%view{ascii} @EXTHELPERSDIR@/package.sh view rpm
281 View=%view{ascii} @EXTHELPERSDIR@/package.sh view deb
286 View=%view{ascii} @EXTHELPERSDIR@/package.sh view debd
291 View=%view{ascii} @EXTHELPERSDIR@/package.sh view deba
295 Open=%cd %p/iso9660://
296 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view iso9660
298 regex/\.(diff|patch)$
299 Open=%cd %p/patchfs://
300 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view cat
305 #Open=%view{ascii} ar tv %f
306 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view ar
311 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view lib
314 type/^ASCII\ mail\ text
315 Open=%cd %p/mailfs://
321 regex/i/\.(c|cc|cpp)$
325 regex/i/\.(h|hh|hpp)$
337 regex/\.(so|so\.[0-9\.]*)$
338 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view so
342 #Open=%var{PAGER:more} %f
343 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view elf
346 ### Documentation ###
349 #regex/\.(te?xi|texinfo)$
353 Open=@EXTHELPERSDIR@/text.sh open info
356 Open=@EXTHELPERSDIR@/text.sh open info
358 # Exception: .3gp are video files not manual pages
362 # Troff with me macros.
363 # Exception - "read.me" is not a nroff file.
369 Open=@EXTHELPERSDIR@/text.sh open nroff.me %var{PAGER:more}
370 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view nroff.me %var{PAGER:more}
372 # Troff with ms macros.
374 Open=@EXTHELPERSDIR@/text.sh open nroff.ms %var{PAGER:more}
375 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view nroff.ms %var{PAGER:more}
377 # Manual page - compressed
378 type/troff.*gzip compressed
379 Open=@EXTHELPERSDIR@/text.sh open man.gz %var{PAGER:more}
380 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.gz %var{PAGER:more}
382 type/troff.*bzip compressed
383 Open=@EXTHELPERSDIR@/text.sh open man.bz %var{PAGER:more}
384 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.bz %var{PAGER:more}
386 type/troff.*bzip2 compressed
387 Open=@EXTHELPERSDIR@/text.sh open man.bz2 %var{PAGER:more}
388 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.bz2 %var{PAGER:more}
391 type/troff or preprocessor input
392 Open=@EXTHELPERSDIR@/text.sh open man %var{PAGER:more}
393 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man %var{PAGER:more}
395 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lz$
396 Open=@EXTHELPERSDIR@/text.sh open man.lz %var{PAGER:more}
397 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lz %var{PAGER:more}
399 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lz4$
400 Open=@EXTHELPERSDIR@/text.sh open man.lz4 %var{PAGER:more}
401 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lz4 %var{PAGER:more}
403 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
404 Open=@EXTHELPERSDIR@/text.sh open man.lzma %var{PAGER:more}
405 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lzma %var{PAGER:more}
407 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
408 Open=@EXTHELPERSDIR@/text.sh open man.xz %var{PAGER:more}
409 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.xz %var{PAGER:more}
411 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.zst$
412 Open=@EXTHELPERSDIR@/text.sh open man.zst %var{PAGER:more}
413 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.zst %var{PAGER:more}
417 Open=@EXTHELPERSDIR@/text.sh open pod %var{PAGER:more}
418 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view pod %var{PAGER:more}
422 Open=@EXTHELPERSDIR@/text.sh open chm
431 View=%view{ascii} @EXTHELPERSDIR@/image.sh view jpeg
462 Open=@EXTHELPERSDIR@/image.sh open xcf
465 Open=@EXTHELPERSDIR@/image.sh open xbm
469 View=@EXTHELPERSDIR@/image.sh view xpm %f
475 View=%view{ascii} @EXTHELPERSDIR@/image.sh view svg
476 Open=@EXTHELPERSDIR@/image.sh open svg
481 regex/i/\.(wav|snd|voc|au|smp|aiff|snd|m4a|ape|aac|wv)$
482 Open=@EXTHELPERSDIR@/sound.sh open common
483 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view common
485 regex/i/\.(mod|s3m|xm|it|mtm|669|stm|ult|far)$
486 Open=@EXTHELPERSDIR@/sound.sh open mod
489 Open=@EXTHELPERSDIR@/sound.sh open wav22
492 Open=@EXTHELPERSDIR@/sound.sh open mp3
493 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view mp3
496 Open=@EXTHELPERSDIR@/sound.sh open ogg
497 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view ogg
500 Open=@EXTHELPERSDIR@/sound.sh open opus
501 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view opus
503 regex/i/\.(spx|flac)$
504 Open=@EXTHELPERSDIR@/sound.sh open common
506 regex/i/\.(midi?|rmid?)$
507 Open=@EXTHELPERSDIR@/sound.sh open midi
510 Open=@EXTHELPERSDIR@/sound.sh open wma
511 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view wma
517 Open=@EXTHELPERSDIR@/sound.sh open playlist
537 regex/i/\.(mp4|m4v|mpe?g)$
540 # MPEG-2 TS container + H.264 codec
560 Open=@EXTHELPERSDIR@/video.sh open ram
574 Open=@EXTHELPERSDIR@/doc.sh open ps
575 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view ps
579 Open=@EXTHELPERSDIR@/doc.sh open pdf
580 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view pdf
584 Open=@EXTHELPERSDIR@/web.sh open html
585 View=%view{ascii} @EXTHELPERSDIR@/web.sh view html
589 Open=@EXTHELPERSDIR@/doc.sh open ooffice
591 # StarOffice 6 and OpenOffice.org formats
592 regex/i/\.(odt|fodt|ott|sxw|stw|ods|fods|ots|sxc|stc|odp|fodp|otp|sxi|sti|odg|fodg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
593 Open=@EXTHELPERSDIR@/doc.sh open ooffice
594 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view odt
598 Open=@EXTHELPERSDIR@/doc.sh open abw
602 Open=@EXTHELPERSDIR@/doc.sh open gnumeric
604 # Microsoft Word Document
605 regex/i/\.(do[ct]|wri|docx)$
606 Open=@EXTHELPERSDIR@/doc.sh open msdoc
607 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msdoc
608 type/^Microsoft\ Word
609 Open=@EXTHELPERSDIR@/doc.sh open msdoc
610 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msdoc
614 Open=@EXTHELPERSDIR@/doc.sh open msdoc
616 # Microsoft Excel Worksheet
617 regex/i/\.(xl[sw]|xlsx)$
618 Open=@EXTHELPERSDIR@/doc.sh open msxls
619 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msxls
620 type/^Microsoft\ Excel
621 Open=@EXTHELPERSDIR@/doc.sh open msxls
622 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msxls
624 # Microsoft PowerPoint Presentation
625 regex/i/\.(pp[ts]|pptx)$
626 Open=@EXTHELPERSDIR@/doc.sh open msppt
627 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msppt
629 # Use OpenOffice.org/LibreOffice to open any MS Office documents
630 type/^Microsoft\ Office\ Document
631 Open=@EXTHELPERSDIR@/doc.sh open ooffice
632 type/^Microsoft\ OOXML
633 Open=@EXTHELPERSDIR@/doc.sh open ooffice
637 Open=@EXTHELPERSDIR@/doc.sh open framemaker
641 Open=@EXTHELPERSDIR@/doc.sh open dvi
642 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view dvi
654 Open=@EXTHELPERSDIR@/doc.sh open djvu
655 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view djvu
659 Open=@EXTHELPERSDIR@/doc.sh open comic
662 regex/i/\.(epub|mobi|fb2)$
663 Open=@EXTHELPERSDIR@/doc.sh open ebook
664 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view ebook
667 ### Miscellaneous ###
669 # Compiled Java classes
671 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view javaclass
677 # Makefile.PL (MakeMaker)
678 regex/^Makefile\.(PL|pl)$
679 Open=%var{PERL:perl} %f
683 Open=make -f %f %{Enter parameters}
686 type/^SQLite 3.x database
687 Open=@EXTHELPERSDIR@/misc.sh open sqlite
688 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view sqlite
692 Open=@EXTHELPERSDIR@/misc.sh open dbf
693 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view dbf
697 Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
699 # Disk images for Commodore computers (VIC20, C64, C128)
701 Open=%cd %p/uc1541://
702 View=%view{ascii} c1541 %f -list
703 Extract=c1541 %f -extract
705 # Glade, a user interface designer for GTK+ and GNOME
707 Open=@EXTHELPERSDIR@/misc.sh open glade
711 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view mo
715 Open=@EXTHELPERSDIR@/misc.sh open po
719 Open=@EXTHELPERSDIR@/misc.sh open lyx
720 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view lyx
724 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view torrent
727 ### Plain compressed files ###
732 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view ace
738 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view arc
740 Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
745 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zip
750 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zoo
754 Open=@EXTHELPERSDIR@/archive.sh view lz4 %var{PAGER:more}
755 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lz4
760 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view wim
763 type/\(gzip compressed
764 Open=@EXTHELPERSDIR@/archive.sh view gz %var{PAGER:more}
765 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
768 type/\(bzip2 compressed
769 Open=@EXTHELPERSDIR@/archive.sh view bzip2 %var{PAGER:more}
770 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
773 type/\(bzip compressed
774 Open=@EXTHELPERSDIR@/archive.sh view bzip %var{PAGER:more}
775 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bzip
779 Open=@EXTHELPERSDIR@/archive.sh view gz %var{PAGER:more}
780 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
783 type/\(lzip compressed
784 Open=@EXTHELPERSDIR@/archive.sh view lz %var{PAGER:more}
785 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lz
788 type/\(LZMA compressed
789 Open=@EXTHELPERSDIR@/archive.sh view lzma %var{PAGER:more}
790 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lzma
794 Open=@EXTHELPERSDIR@/archive.sh view xz %var{PAGER:more}
795 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view xz
798 type/\(Zstandard compressed
799 Open=@EXTHELPERSDIR@/archive.sh view zst %var{PAGER:more}
800 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zst
805 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zip
808 type/i/\(Java\ (Jar\ file|archive)\ data\ \((zip|JAR)\)
810 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zip
815 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lha
820 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view pak
823 type/^Parity\ Archive\ Volume\ Set
824 Open=@EXTHELPERSDIR@/archive.sh open par2
828 # includes should be at end of bindings
831 Open=%var{EDITOR:vi} %f
834 Open=@EXTHELPERSDIR@/image.sh open ALL_FORMATS
835 View=%view{ascii} @EXTHELPERSDIR@/image.sh view ALL_FORMATS
838 Open=@EXTHELPERSDIR@/video.sh open ALL_FORMATS
839 View=%view{ascii} @EXTHELPERSDIR@/video.sh view ALL_FORMATS
844 # Default target for anything not described above