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
139 regex/\.t(ar\.xz|xz)$
141 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.xz
143 # .tar.F - used in QNX
145 # Open=%cd %p/utar://
146 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.F
148 # .qpr/.qpk - QNX Neutrino package installer files
151 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.qpr
156 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar
161 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lha
164 regex/i/\.a(rj|[0-9][0-9])$
166 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view arj
171 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cab
176 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view ha
179 regex/i/\.r(ar|[0-9][0-9])$
181 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view rar
186 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view alz
191 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.z
195 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.xz
199 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.gz
203 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio
205 # 7zip archives (they are not man pages)
208 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view 7z
211 regex/\.(diff|patch)(\.bz2)$
212 Open=%cd %p/patchfs://
213 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
215 regex/\.(diff|patch)(\.(gz|Z))$
216 Open=%cd %p/patchfs://
217 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
220 regex/(^|\.)ls-?lR(\.gz|Z|bz2)$
226 View=%view{ascii} @EXTHELPERSDIR@/package.sh view trpm
228 # RPM packages (SuSE uses *.spm for source packages)
229 regex/\.(src\.rpm|spm)$
231 View=%view{ascii} @EXTHELPERSDIR@/package.sh view src.rpm
235 View=%view{ascii} @EXTHELPERSDIR@/package.sh view rpm
240 View=%view{ascii} @EXTHELPERSDIR@/package.sh view deb
245 View=%view{ascii} @EXTHELPERSDIR@/package.sh view debd
250 View=%view{ascii} @EXTHELPERSDIR@/package.sh view deba
254 Open=%cd %p/iso9660://
255 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view iso9660
258 regex/\.(diff|patch)$
259 Open=%cd %p/patchfs://
260 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view cat
265 #Open=%view{ascii} ar tv %f
266 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view ar
271 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view lib
275 type/^ASCII\ mail\ text
276 Open=%cd %p/mailfs://
282 regex/i/\.(c|cc|cpp)$
286 regex/i/\.(h|hh|hpp)$
298 Open=%var{EDITOR:vi} %f
301 regex/\.(so|so\.[0-9\.]*)$
302 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view so
306 #Open=%var{PAGER:more} %f
307 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view elf
309 ### Documentation ###
312 #regex/\.(te?xi|texinfo)$
316 Open=@EXTHELPERSDIR@/text.sh open info
319 Open=@EXTHELPERSDIR@/text.sh open info
321 # Exception: .3gp are video files not manual pages
326 regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
327 Open=@EXTHELPERSDIR@/text.sh open man %var{PAGER:more}
328 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man %var{PAGER:more}
332 Open=@EXTHELPERSDIR@/text.sh open pod %var{PAGER:more}
333 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view pod %var{PAGER:more}
335 # Troff with me macros.
336 # Exception - "read.me" is not a nroff file.
342 Open=@EXTHELPERSDIR@/text.sh open nroff.me %var{PAGER:more}
343 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view nroff.me %var{PAGER:more}
345 # Troff with ms macros.
347 Open=@EXTHELPERSDIR@/text.sh open nroff.ms %var{PAGER:more}
348 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view nroff.ms %var{PAGER:more}
350 # Manual page - compressed
351 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
352 Open=@EXTHELPERSDIR@/text.sh open man.gz %var{PAGER:more}
353 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.gz %var{PAGER:more}
355 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
356 Open=@EXTHELPERSDIR@/text.sh open man.bz %var{PAGER:more}
357 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.bz %var{PAGER:more}
359 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
360 Open=@EXTHELPERSDIR@/text.sh open man.bz2 %var{PAGER:more}
361 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.bz2 %var{PAGER:more}
363 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
364 Open=@EXTHELPERSDIR@/text.sh open man.lzma %var{PAGER:more}
365 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lzma %var{PAGER:more}
367 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
368 Open=@EXTHELPERSDIR@/text.sh open man.xz %var{PAGER:more}
369 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.xz %var{PAGER:more}
373 Open=@EXTHELPERSDIR@/text.sh open chm
381 View=%view{ascii} @EXTHELPERSDIR@/image.sh view jpeg
412 Open=@EXTHELPERSDIR@/image.sh open xcf
415 Open=@EXTHELPERSDIR@/image.sh open xbm
419 View=@EXTHELPERSDIR@/image.sh view xpm %f
425 View=%view{ascii} @EXTHELPERSDIR@/image.sh view svg
426 Open=@EXTHELPERSDIR@/image.sh open svg
429 Open=@EXTHELPERSDIR@/image.sh open ALL_FORMATS
430 View=%view{ascii} @EXTHELPERSDIR@/image.sh view ALL_FORMATS
435 regex/i/\.(wav|snd|voc|au|smp|aiff|snd|m4a|ape|aac|wv)$
436 Open=@EXTHELPERSDIR@/sound.sh open common
438 regex/i/\.(mod|s3m|xm|it|mtm|669|stm|ult|far)$
439 Open=@EXTHELPERSDIR@/sound.sh open mod
442 Open=@EXTHELPERSDIR@/sound.sh open wav22
445 Open=@EXTHELPERSDIR@/sound.sh open mp3
446 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view mp3
449 Open=@EXTHELPERSDIR@/sound.sh open ogg
450 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view ogg
452 regex/i/\.(spx|flac)$
453 Open=@EXTHELPERSDIR@/sound.sh open common
455 regex/i/\.(midi?|rmid?)$
456 Open=@EXTHELPERSDIR@/sound.sh open midi
459 Open=@EXTHELPERSDIR@/sound.sh open wma
460 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view wma
466 Open=@EXTHELPERSDIR@/sound.sh open playlist
486 regex/i/\.(mp4|m4v|mpe?g)$
489 # MPEG-2 TS container + H.264 codec
509 Open=@EXTHELPERSDIR@/video.sh open ram
519 Open=@EXTHELPERSDIR@/video.sh open ALL_FORMATS
520 View=%view{ascii} @EXTHELPERSDIR@/video.sh view ALL_FORMATS
527 Open=@EXTHELPERSDIR@/doc.sh open ps
528 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view ps
532 Open=@EXTHELPERSDIR@/doc.sh open pdf
533 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view pdf
537 Open=@EXTHELPERSDIR@/web.sh open html
538 View=%view{ascii} @EXTHELPERSDIR@/web.sh view html
542 Open=@EXTHELPERSDIR@/doc.sh open ooffice
544 # StarOffice 6 and OpenOffice.org formats
545 regex/i/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
546 Open=@EXTHELPERSDIR@/doc.sh open ooffice
547 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view odt
551 Open=@EXTHELPERSDIR@/doc.sh open abw
555 Open=@EXTHELPERSDIR@/doc.sh open gnumeric
557 # Microsoft Word Document
558 regex/i/\.(do[ct]|wri)$
559 Open=@EXTHELPERSDIR@/doc.sh open msdoc
560 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msdoc
561 type/^Microsoft\ Word
562 Open=@EXTHELPERSDIR@/doc.sh open msdoc
563 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msdoc
567 Open=@EXTHELPERSDIR@/doc.sh open msdoc
569 # Microsoft Excel Worksheet
571 Open=@EXTHELPERSDIR@/doc.sh open msxls
572 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msxls
573 type/^Microsoft\ Excel
574 Open=@EXTHELPERSDIR@/doc.sh open msxls
575 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msxls
578 Open=@EXTHELPERSDIR@/doc.sh open msppt
579 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msppt
581 # Use OpenOffice.org to open any MS Office documents
582 type/^Microsoft\ Office\ Document
583 Open=@EXTHELPERSDIR@/doc.sh open ooffice
587 Open=@EXTHELPERSDIR@/doc.sh open framemaker
591 Open=@EXTHELPERSDIR@/doc.sh open dvi
592 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view dvi
600 Open=@EXTHELPERSDIR@/doc.sh open djvu
601 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view djvu
605 Open=@EXTHELPERSDIR@/doc.sh open comic
609 Open=@EXTHELPERSDIR@/doc.sh open epub
610 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view epub
613 ### Miscellaneous ###
615 # Compiled Java classes
617 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view javaclass
621 Open=make -f %f %{Enter parameters}
625 Open=@EXTHELPERSDIR@/misc.sh open imakefile
627 # Makefile.PL (MakeMaker)
628 regex/^Makefile.(PL|pl)$
629 Open=%var{PERL:perl} %f
632 type/^SQLite 3.x database
633 Open=@EXTHELPERSDIR@/misc.sh open sqlite
634 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view sqlite
638 Open=@EXTHELPERSDIR@/misc.sh open dbf
639 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view dbf
643 Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
645 # Disk images for Commodore computers (VIC20, C64, C128)
647 Open=%cd %p/uc1541://
648 View=%view{ascii} c1541 %f -list
649 Extract=c1541 %f -extract
651 # Glade, a user interface designer for GTK+ and GNOME
653 Open=@EXTHELPERSDIR@/misc.sh open glade
657 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view mo
661 Open=@EXTHELPERSDIR@/misc.sh open lyx
662 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view lyx
666 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view torrent
668 ### Plain compressed files ###
673 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view ace
679 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view arc
681 Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
686 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zip
691 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zoo
695 Open=@EXTHELPERSDIR@/archive.sh view gz %var{PAGER:more}
696 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
699 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
703 Open=@EXTHELPERSDIR@/archive.sh view bzip2 %var{PAGER:more}
704 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
707 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
711 Open=@EXTHELPERSDIR@/archive.sh view bzip %var{PAGER:more}
712 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bzip
716 Open=@EXTHELPERSDIR@/archive.sh view gz %var{PAGER:more}
717 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
721 Open=@EXTHELPERSDIR@/archive.sh view lzma %var{PAGER:more}
722 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lzma
726 Open=@EXTHELPERSDIR@/archive.sh view xz %var{PAGER:more}
727 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view xz
730 type/^Parity\ Archive\ Volume\ Set
731 Open=@EXTHELPERSDIR@/archive.sh open par2
735 # Default target for anything not described above