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))
29 # type/i (file matches this if `file %f` matches regular expression desc)
30 # The same as type but with case insensitive.
32 # directory (matches any directory matching regular expression desc)
34 # include (matches an include directive)
36 # default (matches any file no matter what desc is)
38 # Other lines should start with a space or tab and should be in the format:
40 # keyword=commandNL (with no spaces around =), where keyword should be:
42 # Open (if the user presses Enter or doubleclicks it),
44 # View (F3), Edit (F4)
46 # Include is the keyword used to add any further entries from an include/
49 # command is any one-line shell command, with the following substitutions:
52 # %p -> name of the current file (without path, but pwd is its path).
53 # Also provided to external application as MC_EXT_BASENAME
55 # %f -> name of the current file. Unlike %p, if file is located on a
56 # non-local virtual filesystem, i.e. either tarfs or ftpfs,
57 # then the file will be temporarily copied into a local directory
58 # and %f will be the full path to this local temporal file.
59 # If you don't want to get a local copy and want to get the
60 # virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then
61 # use %d/%p instead of %f.
62 # Also provided to external application as MC_EXT_FILENAME
64 # %d -> name of the current directory (pwd, without trailing slash)
65 # Also provided to external application as MC_EXT_CURRENTDIR
67 # %s -> "selected files", i.e. space separated list of tagged files if any
68 # or name of the current file.
69 # Also provided to external application as MC_EXT_SELECTED
71 # %t -> list of tagged files
72 # Also provided to external application as MC_EXT_ONLYTAGGED
74 # %u -> list of tagged files (they'll be untaged after the command)
76 # (If these 6 letters are in uppercase, they refer to the other panel.
77 # But you shouldn't have to use it in this file.)
80 # %cd -> the rest is a path mc should change into (cd won't work, since it's
81 # a child process). %cd handles even vfs names.
83 # %view -> the command you type will be piped into mc's internal file viewer
84 # if you type only the %view and no command, viewer will load %f file
85 # instead (i.e. no piping, so it is different to %view cat %f)
86 # %view may be directly followed by {} with a list of any of
87 # ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for
88 # text using backspace for bold and underscore) and unform
89 # (no highlighting for nroff sequences) separated by commas.
91 # %var -> You use it like this: %var{VAR:default}. This macro will expand
92 # to the value of the VAR variable in the environment if it's set
93 # otherwise the value in default will be used. This is similar to
94 # the Bourne shell ${VAR-default} construct.
96 # Rules are applied from top to bottom, thus the order is important.
97 # If some actions are missing, search continues as if this target didn't
98 # match (i.e. if a file matches the first and second entry and View action
99 # is missing in the first one, then on pressing F3 the View action from
100 # the second entry will be used. default should catch all the actions.
102 # Any new entries you develop for you are always welcome if they are
103 # useful on more than one system. You can post your modifications
104 # as tickets at www.midnight-commander.org
109 # Reorganization: 2012-03-07 Slava Zanko <slavazanko@gmail.com>
115 Open=%cd %p/changesetfs://
116 View=%cd %p/patchsetfs://
120 # .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk, .gem
121 regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$|\.gem$
123 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.gz
126 # Open=%cd %p/utar://
127 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.bzip
129 regex/\.t(ar\.bz2|bz2?|b2)$
131 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.bzip2
134 regex/\.t(ar\.lzma|lz)$
136 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lzma
141 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lz
144 regex/\.t(ar\.lz4|lz4)$
146 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lz4
149 regex/\.t(ar\.xz|xz)$
151 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.xz
154 regex/\.t(ar\.zst|zst)$
156 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.zst
158 # .tar.F - used in QNX
160 # Open=%cd %p/utar://
161 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.F
163 # .qpr/.qpk - QNX Neutrino package installer files
166 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.qpr
171 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar
176 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lha
179 regex/i/\.a(rj|[0-9][0-9])$
181 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view arj
186 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cab
191 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view ha
194 regex/i/\.r(ar|[0-9][0-9])$
196 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view rar
201 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view alz
206 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.z
210 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.lz
214 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.lz4
218 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.xz
222 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.zst
226 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.gz
230 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio
233 regex/^(initramfs.*\.img|initrd(-.+)?\.img(-.+)?)$
235 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio
237 # 7zip archives (they are not man pages)
240 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view 7z
243 regex/\.(diff|patch)(\.bz2)$
244 Open=%cd %p/patchfs://
245 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
247 regex/\.(diff|patch)(\.(gz|Z))$
248 Open=%cd %p/patchfs://
249 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
251 regex/\.(diff|patch)(\.xz)$
252 Open=%cd %p/patchfs://
253 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view xz
255 regex/\.(diff|patch)(\.zst)$
256 Open=%cd %p/patchfs://
257 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zst
260 regex/(^|\.)ls-?lR(\.gz|Z|bz2)$
266 View=%view{ascii} @EXTHELPERSDIR@/package.sh view trpm
268 # RPM packages (SuSE uses *.spm for source packages)
269 regex/\.(src\.rpm|spm)$
271 View=%view{ascii} @EXTHELPERSDIR@/package.sh view src.rpm
275 View=%view{ascii} @EXTHELPERSDIR@/package.sh view rpm
280 View=%view{ascii} @EXTHELPERSDIR@/package.sh view deb
285 View=%view{ascii} @EXTHELPERSDIR@/package.sh view debd
290 View=%view{ascii} @EXTHELPERSDIR@/package.sh view deba
294 Open=%cd %p/iso9660://
295 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
315 type/^ASCII\ mail\ text
316 Open=%cd %p/mailfs://
322 regex/i/\.(c|cc|cpp)$
326 regex/i/\.(h|hh|hpp)$
338 Open=%var{EDITOR:vi} %f
341 regex/\.(so|so\.[0-9\.]*)$
342 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view so
346 #Open=%var{PAGER:more} %f
347 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view elf
349 ### Documentation ###
352 #regex/\.(te?xi|texinfo)$
356 Open=@EXTHELPERSDIR@/text.sh open info
359 Open=@EXTHELPERSDIR@/text.sh open info
361 # Exception: .3gp are video files not manual pages
366 regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
367 Open=@EXTHELPERSDIR@/text.sh open man %var{PAGER:more}
368 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man %var{PAGER:more}
372 Open=@EXTHELPERSDIR@/text.sh open pod %var{PAGER:more}
373 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view pod %var{PAGER:more}
375 # Troff with me macros.
376 # Exception - "read.me" is not a nroff file.
382 Open=@EXTHELPERSDIR@/text.sh open nroff.me %var{PAGER:more}
383 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view nroff.me %var{PAGER:more}
385 # Troff with ms macros.
387 Open=@EXTHELPERSDIR@/text.sh open nroff.ms %var{PAGER:more}
388 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view nroff.ms %var{PAGER:more}
390 # Manual page - compressed
391 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
392 Open=@EXTHELPERSDIR@/text.sh open man.gz %var{PAGER:more}
393 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.gz %var{PAGER:more}
395 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
396 Open=@EXTHELPERSDIR@/text.sh open man.bz %var{PAGER:more}
397 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.bz %var{PAGER:more}
399 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
400 Open=@EXTHELPERSDIR@/text.sh open man.bz2 %var{PAGER:more}
401 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.bz2 %var{PAGER:more}
403 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lz$
404 Open=@EXTHELPERSDIR@/text.sh open man.lz %var{PAGER:more}
405 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lz %var{PAGER:more}
407 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lz4$
408 Open=@EXTHELPERSDIR@/text.sh open man.lz4 %var{PAGER:more}
409 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lz4 %var{PAGER:more}
411 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
412 Open=@EXTHELPERSDIR@/text.sh open man.lzma %var{PAGER:more}
413 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lzma %var{PAGER:more}
415 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
416 Open=@EXTHELPERSDIR@/text.sh open man.xz %var{PAGER:more}
417 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.xz %var{PAGER:more}
419 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.zst$
420 Open=@EXTHELPERSDIR@/text.sh open man.zst %var{PAGER:more}
421 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.zst %var{PAGER:more}
425 Open=@EXTHELPERSDIR@/text.sh open chm
433 View=%view{ascii} @EXTHELPERSDIR@/image.sh view jpeg
464 Open=@EXTHELPERSDIR@/image.sh open xcf
467 Open=@EXTHELPERSDIR@/image.sh open xbm
471 View=@EXTHELPERSDIR@/image.sh view xpm %f
477 View=%view{ascii} @EXTHELPERSDIR@/image.sh view svg
478 Open=@EXTHELPERSDIR@/image.sh open svg
481 Open=@EXTHELPERSDIR@/image.sh open ALL_FORMATS
482 View=%view{ascii} @EXTHELPERSDIR@/image.sh view ALL_FORMATS
487 regex/i/\.(wav|snd|voc|au|smp|aiff|snd|m4a|ape|aac|wv)$
488 Open=@EXTHELPERSDIR@/sound.sh open common
490 regex/i/\.(mod|s3m|xm|it|mtm|669|stm|ult|far)$
491 Open=@EXTHELPERSDIR@/sound.sh open mod
494 Open=@EXTHELPERSDIR@/sound.sh open wav22
497 Open=@EXTHELPERSDIR@/sound.sh open mp3
498 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view mp3
501 Open=@EXTHELPERSDIR@/sound.sh open ogg
502 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view ogg
504 regex/i/\.(spx|flac)$
505 Open=@EXTHELPERSDIR@/sound.sh open common
507 regex/i/\.(midi?|rmid?)$
508 Open=@EXTHELPERSDIR@/sound.sh open midi
511 Open=@EXTHELPERSDIR@/sound.sh open wma
512 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view wma
518 Open=@EXTHELPERSDIR@/sound.sh open playlist
538 regex/i/\.(mp4|m4v|mpe?g)$
541 # MPEG-2 TS container + H.264 codec
561 Open=@EXTHELPERSDIR@/video.sh open ram
571 Open=@EXTHELPERSDIR@/video.sh open ALL_FORMATS
572 View=%view{ascii} @EXTHELPERSDIR@/video.sh view ALL_FORMATS
579 Open=@EXTHELPERSDIR@/doc.sh open ps
580 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view ps
584 Open=@EXTHELPERSDIR@/doc.sh open pdf
585 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view pdf
589 Open=@EXTHELPERSDIR@/web.sh open html
590 View=%view{ascii} @EXTHELPERSDIR@/web.sh view html
594 Open=@EXTHELPERSDIR@/doc.sh open ooffice
596 # StarOffice 6 and OpenOffice.org formats
597 regex/i/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
598 Open=@EXTHELPERSDIR@/doc.sh open ooffice
599 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view odt
603 Open=@EXTHELPERSDIR@/doc.sh open abw
607 Open=@EXTHELPERSDIR@/doc.sh open gnumeric
609 # Microsoft Word Document
610 regex/i/\.(do[ct]|wri)$
611 Open=@EXTHELPERSDIR@/doc.sh open msdoc
612 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msdoc
613 type/^Microsoft\ Word
614 Open=@EXTHELPERSDIR@/doc.sh open msdoc
615 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msdoc
619 Open=@EXTHELPERSDIR@/doc.sh open msdoc
621 # Microsoft Excel Worksheet
622 regex/i/\.(xl[sw]|xlsx)$
623 Open=@EXTHELPERSDIR@/doc.sh open msxls
624 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msxls
625 type/^Microsoft\ Excel
626 Open=@EXTHELPERSDIR@/doc.sh open msxls
627 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msxls
630 Open=@EXTHELPERSDIR@/doc.sh open msppt
631 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msppt
633 # Use OpenOffice.org to open any MS Office documents
634 type/^Microsoft\ Office\ Document
635 Open=@EXTHELPERSDIR@/doc.sh open ooffice
639 Open=@EXTHELPERSDIR@/doc.sh open framemaker
643 Open=@EXTHELPERSDIR@/doc.sh open dvi
644 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view dvi
652 Open=@EXTHELPERSDIR@/doc.sh open djvu
653 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view djvu
657 Open=@EXTHELPERSDIR@/doc.sh open comic
660 regex/i/\.(epub|mobi)$
661 Open=@EXTHELPERSDIR@/doc.sh open epub
662 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view epub
665 ### Miscellaneous ###
667 # Compiled Java classes
669 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view javaclass
673 Open=make -f %f %{Enter parameters}
679 # Makefile.PL (MakeMaker)
680 regex/^Makefile\.(PL|pl)$
681 Open=%var{PERL:perl} %f
684 type/^SQLite 3.x database
685 Open=@EXTHELPERSDIR@/misc.sh open sqlite
686 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view sqlite
690 Open=@EXTHELPERSDIR@/misc.sh open dbf
691 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view dbf
695 Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
697 # Disk images for Commodore computers (VIC20, C64, C128)
699 Open=%cd %p/uc1541://
700 View=%view{ascii} c1541 %f -list
701 Extract=c1541 %f -extract
703 # Glade, a user interface designer for GTK+ and GNOME
705 Open=@EXTHELPERSDIR@/misc.sh open glade
709 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view mo
713 Open=@EXTHELPERSDIR@/misc.sh open po
717 Open=@EXTHELPERSDIR@/misc.sh open lyx
718 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view lyx
722 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view torrent
724 ### Plain compressed files ###
729 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view ace
735 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view arc
737 Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
742 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zip
747 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zip
750 type/i/^Java\ (Jar\ file|archive)\ data\ \((zip|JAR)\)
752 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zip
757 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zoo
761 Open=@EXTHELPERSDIR@/archive.sh view gz %var{PAGER:more}
762 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
765 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
769 Open=@EXTHELPERSDIR@/archive.sh view bzip2 %var{PAGER:more}
770 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
773 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
777 Open=@EXTHELPERSDIR@/archive.sh view bzip %var{PAGER:more}
778 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bzip
782 Open=@EXTHELPERSDIR@/archive.sh view gz %var{PAGER:more}
783 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
787 Open=@EXTHELPERSDIR@/archive.sh view lz %var{PAGER:more}
788 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lz
792 Open=@EXTHELPERSDIR@/archive.sh view lz %var{PAGER:more}
793 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lz
797 Open=@EXTHELPERSDIR@/archive.sh view lz4 %var{PAGER:more}
798 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lz4
802 Open=@EXTHELPERSDIR@/archive.sh view lzma %var{PAGER:more}
803 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lzma
807 Open=@EXTHELPERSDIR@/archive.sh view xz %var{PAGER:more}
808 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view xz
812 Open=@EXTHELPERSDIR@/archive.sh view zst %var{PAGER:more}
813 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zst
816 type/^Parity\ Archive\ Volume\ Set
817 Open=@EXTHELPERSDIR@/archive.sh open par2
821 # Default target for anything not described above