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
153 # .tar.F - used in QNX
155 # Open=%cd %p/utar://
156 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.F
158 # .qpr/.qpk - QNX Neutrino package installer files
161 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.qpr
166 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar
171 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lha
174 regex/i/\.a(rj|[0-9][0-9])$
176 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view arj
181 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cab
186 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view ha
189 regex/i/\.r(ar|[0-9][0-9])$
191 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view rar
196 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view alz
201 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.z
205 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.lz
209 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.lz4
213 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.xz
217 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.gz
221 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio
224 regex/^(initramfs.*\.img|initrd(-.+)?\.img(-.+)?)$
226 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio
228 # 7zip archives (they are not man pages)
231 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view 7z
234 regex/\.(diff|patch)(\.bz2)$
235 Open=%cd %p/patchfs://
236 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
238 regex/\.(diff|patch)(\.(gz|Z))$
239 Open=%cd %p/patchfs://
240 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
242 regex/\.(diff|patch)(\.xz)$
243 Open=%cd %p/patchfs://
244 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view xz
247 regex/(^|\.)ls-?lR(\.gz|Z|bz2)$
253 View=%view{ascii} @EXTHELPERSDIR@/package.sh view trpm
255 # RPM packages (SuSE uses *.spm for source packages)
256 regex/\.(src\.rpm|spm)$
258 View=%view{ascii} @EXTHELPERSDIR@/package.sh view src.rpm
262 View=%view{ascii} @EXTHELPERSDIR@/package.sh view rpm
267 View=%view{ascii} @EXTHELPERSDIR@/package.sh view deb
272 View=%view{ascii} @EXTHELPERSDIR@/package.sh view debd
277 View=%view{ascii} @EXTHELPERSDIR@/package.sh view deba
281 Open=%cd %p/iso9660://
282 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view iso9660
285 regex/\.(diff|patch)$
286 Open=%cd %p/patchfs://
287 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view cat
292 #Open=%view{ascii} ar tv %f
293 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view ar
298 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view lib
302 type/^ASCII\ mail\ text
303 Open=%cd %p/mailfs://
309 regex/i/\.(c|cc|cpp)$
313 regex/i/\.(h|hh|hpp)$
325 Open=%var{EDITOR:vi} %f
328 regex/\.(so|so\.[0-9\.]*)$
329 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view so
333 #Open=%var{PAGER:more} %f
334 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view elf
336 ### Documentation ###
339 #regex/\.(te?xi|texinfo)$
343 Open=@EXTHELPERSDIR@/text.sh open info
346 Open=@EXTHELPERSDIR@/text.sh open info
348 # Exception: .3gp are video files not manual pages
353 regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
354 Open=@EXTHELPERSDIR@/text.sh open man %var{PAGER:more}
355 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man %var{PAGER:more}
359 Open=@EXTHELPERSDIR@/text.sh open pod %var{PAGER:more}
360 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view pod %var{PAGER:more}
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 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
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 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
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 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
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}
390 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lz$
391 Open=@EXTHELPERSDIR@/text.sh open man.lz %var{PAGER:more}
392 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lz %var{PAGER:more}
394 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lz4$
395 Open=@EXTHELPERSDIR@/text.sh open man.lz4 %var{PAGER:more}
396 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lz4 %var{PAGER:more}
398 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
399 Open=@EXTHELPERSDIR@/text.sh open man.lzma %var{PAGER:more}
400 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lzma %var{PAGER:more}
402 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
403 Open=@EXTHELPERSDIR@/text.sh open man.xz %var{PAGER:more}
404 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.xz %var{PAGER:more}
408 Open=@EXTHELPERSDIR@/text.sh open chm
416 View=%view{ascii} @EXTHELPERSDIR@/image.sh view jpeg
447 Open=@EXTHELPERSDIR@/image.sh open xcf
450 Open=@EXTHELPERSDIR@/image.sh open xbm
454 View=@EXTHELPERSDIR@/image.sh view xpm %f
460 View=%view{ascii} @EXTHELPERSDIR@/image.sh view svg
461 Open=@EXTHELPERSDIR@/image.sh open svg
464 Open=@EXTHELPERSDIR@/image.sh open ALL_FORMATS
465 View=%view{ascii} @EXTHELPERSDIR@/image.sh view ALL_FORMATS
470 regex/i/\.(wav|snd|voc|au|smp|aiff|snd|m4a|ape|aac|wv)$
471 Open=@EXTHELPERSDIR@/sound.sh open common
473 regex/i/\.(mod|s3m|xm|it|mtm|669|stm|ult|far)$
474 Open=@EXTHELPERSDIR@/sound.sh open mod
477 Open=@EXTHELPERSDIR@/sound.sh open wav22
480 Open=@EXTHELPERSDIR@/sound.sh open mp3
481 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view mp3
484 Open=@EXTHELPERSDIR@/sound.sh open ogg
485 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view ogg
487 regex/i/\.(spx|flac)$
488 Open=@EXTHELPERSDIR@/sound.sh open common
490 regex/i/\.(midi?|rmid?)$
491 Open=@EXTHELPERSDIR@/sound.sh open midi
494 Open=@EXTHELPERSDIR@/sound.sh open wma
495 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view wma
501 Open=@EXTHELPERSDIR@/sound.sh open playlist
521 regex/i/\.(mp4|m4v|mpe?g)$
524 # MPEG-2 TS container + H.264 codec
544 Open=@EXTHELPERSDIR@/video.sh open ram
554 Open=@EXTHELPERSDIR@/video.sh open ALL_FORMATS
555 View=%view{ascii} @EXTHELPERSDIR@/video.sh view ALL_FORMATS
562 Open=@EXTHELPERSDIR@/doc.sh open ps
563 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view ps
567 Open=@EXTHELPERSDIR@/doc.sh open pdf
568 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view pdf
572 Open=@EXTHELPERSDIR@/web.sh open html
573 View=%view{ascii} @EXTHELPERSDIR@/web.sh view html
577 Open=@EXTHELPERSDIR@/doc.sh open ooffice
579 # StarOffice 6 and OpenOffice.org formats
580 regex/i/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
581 Open=@EXTHELPERSDIR@/doc.sh open ooffice
582 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view odt
586 Open=@EXTHELPERSDIR@/doc.sh open abw
590 Open=@EXTHELPERSDIR@/doc.sh open gnumeric
592 # Microsoft Word Document
593 regex/i/\.(do[ct]|wri)$
594 Open=@EXTHELPERSDIR@/doc.sh open msdoc
595 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msdoc
596 type/^Microsoft\ Word
597 Open=@EXTHELPERSDIR@/doc.sh open msdoc
598 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msdoc
602 Open=@EXTHELPERSDIR@/doc.sh open msdoc
604 # Microsoft Excel Worksheet
606 Open=@EXTHELPERSDIR@/doc.sh open msxls
607 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msxls
608 type/^Microsoft\ Excel
609 Open=@EXTHELPERSDIR@/doc.sh open msxls
610 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msxls
613 Open=@EXTHELPERSDIR@/doc.sh open msppt
614 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msppt
616 # Use OpenOffice.org to open any MS Office documents
617 type/^Microsoft\ Office\ Document
618 Open=@EXTHELPERSDIR@/doc.sh open ooffice
622 Open=@EXTHELPERSDIR@/doc.sh open framemaker
626 Open=@EXTHELPERSDIR@/doc.sh open dvi
627 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view dvi
635 Open=@EXTHELPERSDIR@/doc.sh open djvu
636 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view djvu
640 Open=@EXTHELPERSDIR@/doc.sh open comic
643 regex/i/\.(epub|mobi)$
644 Open=@EXTHELPERSDIR@/doc.sh open epub
645 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view epub
648 ### Miscellaneous ###
650 # Compiled Java classes
652 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view javaclass
656 Open=make -f %f %{Enter parameters}
662 # Makefile.PL (MakeMaker)
663 regex/^Makefile\.(PL|pl)$
664 Open=%var{PERL:perl} %f
667 type/^SQLite 3.x database
668 Open=@EXTHELPERSDIR@/misc.sh open sqlite
669 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view sqlite
673 Open=@EXTHELPERSDIR@/misc.sh open dbf
674 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view dbf
678 Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
680 # Disk images for Commodore computers (VIC20, C64, C128)
682 Open=%cd %p/uc1541://
683 View=%view{ascii} c1541 %f -list
684 Extract=c1541 %f -extract
686 # Glade, a user interface designer for GTK+ and GNOME
688 Open=@EXTHELPERSDIR@/misc.sh open glade
692 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view mo
696 Open=@EXTHELPERSDIR@/misc.sh open po
700 Open=@EXTHELPERSDIR@/misc.sh open lyx
701 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view lyx
705 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view torrent
707 ### Plain compressed files ###
712 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view ace
718 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view arc
720 Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
725 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zip
730 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zip
733 type/i/^Java\ (Jar\ file|archive)\ data\ \((zip|JAR)\)
735 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zip
740 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zoo
744 Open=@EXTHELPERSDIR@/archive.sh view gz %var{PAGER:more}
745 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
748 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
752 Open=@EXTHELPERSDIR@/archive.sh view bzip2 %var{PAGER:more}
753 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
756 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
760 Open=@EXTHELPERSDIR@/archive.sh view bzip %var{PAGER:more}
761 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bzip
765 Open=@EXTHELPERSDIR@/archive.sh view gz %var{PAGER:more}
766 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
770 Open=@EXTHELPERSDIR@/archive.sh view lz %var{PAGER:more}
771 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lz
775 Open=@EXTHELPERSDIR@/archive.sh view lz %var{PAGER:more}
776 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lz
780 Open=@EXTHELPERSDIR@/archive.sh view lz4 %var{PAGER:more}
781 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lz4
785 Open=@EXTHELPERSDIR@/archive.sh view lzma %var{PAGER:more}
786 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lzma
790 Open=@EXTHELPERSDIR@/archive.sh view xz %var{PAGER:more}
791 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view xz
794 type/^Parity\ Archive\ Volume\ Set
795 Open=@EXTHELPERSDIR@/archive.sh open par2
799 # Default target for anything not described above