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\.lz4|lz4)$
141 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lz4
144 regex/\.t(ar\.xz|xz)$
146 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.xz
148 # .tar.F - used in QNX
150 # Open=%cd %p/utar://
151 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.F
153 # .qpr/.qpk - QNX Neutrino package installer files
156 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.qpr
161 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar
166 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lha
169 regex/i/\.a(rj|[0-9][0-9])$
171 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view arj
176 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cab
181 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view ha
184 regex/i/\.r(ar|[0-9][0-9])$
186 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view rar
191 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view alz
196 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.z
200 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.lz4
204 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.xz
208 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.gz
212 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio
215 regex/^(initramfs.*\.img|initrd\.img(-.+)?)$
218 # 7zip archives (they are not man pages)
221 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view 7z
224 regex/\.(diff|patch)(\.bz2)$
225 Open=%cd %p/patchfs://
226 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
228 regex/\.(diff|patch)(\.(gz|Z))$
229 Open=%cd %p/patchfs://
230 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
232 regex/\.(diff|patch)(\.xz)$
233 Open=%cd %p/patchfs://
234 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view xz
237 regex/(^|\.)ls-?lR(\.gz|Z|bz2)$
243 View=%view{ascii} @EXTHELPERSDIR@/package.sh view trpm
245 # RPM packages (SuSE uses *.spm for source packages)
246 regex/\.(src\.rpm|spm)$
248 View=%view{ascii} @EXTHELPERSDIR@/package.sh view src.rpm
252 View=%view{ascii} @EXTHELPERSDIR@/package.sh view rpm
257 View=%view{ascii} @EXTHELPERSDIR@/package.sh view deb
262 View=%view{ascii} @EXTHELPERSDIR@/package.sh view debd
267 View=%view{ascii} @EXTHELPERSDIR@/package.sh view deba
271 Open=%cd %p/iso9660://
272 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view iso9660
275 regex/\.(diff|patch)$
276 Open=%cd %p/patchfs://
277 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view cat
282 #Open=%view{ascii} ar tv %f
283 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view ar
288 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view lib
292 type/^ASCII\ mail\ text
293 Open=%cd %p/mailfs://
299 regex/i/\.(c|cc|cpp)$
303 regex/i/\.(h|hh|hpp)$
315 Open=%var{EDITOR:vi} %f
318 regex/\.(so|so\.[0-9\.]*)$
319 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view so
323 #Open=%var{PAGER:more} %f
324 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view elf
326 ### Documentation ###
329 #regex/\.(te?xi|texinfo)$
333 Open=@EXTHELPERSDIR@/text.sh open info
336 Open=@EXTHELPERSDIR@/text.sh open info
338 # Exception: .3gp are video files not manual pages
343 regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
344 Open=@EXTHELPERSDIR@/text.sh open man %var{PAGER:more}
345 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man %var{PAGER:more}
349 Open=@EXTHELPERSDIR@/text.sh open pod %var{PAGER:more}
350 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view pod %var{PAGER:more}
352 # Troff with me macros.
353 # Exception - "read.me" is not a nroff file.
359 Open=@EXTHELPERSDIR@/text.sh open nroff.me %var{PAGER:more}
360 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view nroff.me %var{PAGER:more}
362 # Troff with ms macros.
364 Open=@EXTHELPERSDIR@/text.sh open nroff.ms %var{PAGER:more}
365 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view nroff.ms %var{PAGER:more}
367 # Manual page - compressed
368 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
369 Open=@EXTHELPERSDIR@/text.sh open man.gz %var{PAGER:more}
370 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.gz %var{PAGER:more}
372 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
373 Open=@EXTHELPERSDIR@/text.sh open man.bz %var{PAGER:more}
374 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.bz %var{PAGER:more}
376 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
377 Open=@EXTHELPERSDIR@/text.sh open man.bz2 %var{PAGER:more}
378 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.bz2 %var{PAGER:more}
380 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lz4$
381 Open=@EXTHELPERSDIR@/text.sh open man.lz4 %var{PAGER:more}
382 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lz4 %var{PAGER:more}
384 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
385 Open=@EXTHELPERSDIR@/text.sh open man.lzma %var{PAGER:more}
386 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lzma %var{PAGER:more}
388 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
389 Open=@EXTHELPERSDIR@/text.sh open man.xz %var{PAGER:more}
390 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.xz %var{PAGER:more}
394 Open=@EXTHELPERSDIR@/text.sh open chm
402 View=%view{ascii} @EXTHELPERSDIR@/image.sh view jpeg
433 Open=@EXTHELPERSDIR@/image.sh open xcf
436 Open=@EXTHELPERSDIR@/image.sh open xbm
440 View=@EXTHELPERSDIR@/image.sh view xpm %f
446 View=%view{ascii} @EXTHELPERSDIR@/image.sh view svg
447 Open=@EXTHELPERSDIR@/image.sh open svg
450 Open=@EXTHELPERSDIR@/image.sh open ALL_FORMATS
451 View=%view{ascii} @EXTHELPERSDIR@/image.sh view ALL_FORMATS
456 regex/i/\.(wav|snd|voc|au|smp|aiff|snd|m4a|ape|aac|wv)$
457 Open=@EXTHELPERSDIR@/sound.sh open common
459 regex/i/\.(mod|s3m|xm|it|mtm|669|stm|ult|far)$
460 Open=@EXTHELPERSDIR@/sound.sh open mod
463 Open=@EXTHELPERSDIR@/sound.sh open wav22
466 Open=@EXTHELPERSDIR@/sound.sh open mp3
467 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view mp3
470 Open=@EXTHELPERSDIR@/sound.sh open ogg
471 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view ogg
473 regex/i/\.(spx|flac)$
474 Open=@EXTHELPERSDIR@/sound.sh open common
476 regex/i/\.(midi?|rmid?)$
477 Open=@EXTHELPERSDIR@/sound.sh open midi
480 Open=@EXTHELPERSDIR@/sound.sh open wma
481 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view wma
487 Open=@EXTHELPERSDIR@/sound.sh open playlist
507 regex/i/\.(mp4|m4v|mpe?g)$
510 # MPEG-2 TS container + H.264 codec
530 Open=@EXTHELPERSDIR@/video.sh open ram
540 Open=@EXTHELPERSDIR@/video.sh open ALL_FORMATS
541 View=%view{ascii} @EXTHELPERSDIR@/video.sh view ALL_FORMATS
548 Open=@EXTHELPERSDIR@/doc.sh open ps
549 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view ps
553 Open=@EXTHELPERSDIR@/doc.sh open pdf
554 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view pdf
558 Open=@EXTHELPERSDIR@/web.sh open html
559 View=%view{ascii} @EXTHELPERSDIR@/web.sh view html
563 Open=@EXTHELPERSDIR@/doc.sh open ooffice
565 # StarOffice 6 and OpenOffice.org formats
566 regex/i/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
567 Open=@EXTHELPERSDIR@/doc.sh open ooffice
568 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view odt
572 Open=@EXTHELPERSDIR@/doc.sh open abw
576 Open=@EXTHELPERSDIR@/doc.sh open gnumeric
578 # Microsoft Word Document
579 regex/i/\.(do[ct]|wri)$
580 Open=@EXTHELPERSDIR@/doc.sh open msdoc
581 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msdoc
582 type/^Microsoft\ Word
583 Open=@EXTHELPERSDIR@/doc.sh open msdoc
584 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msdoc
588 Open=@EXTHELPERSDIR@/doc.sh open msdoc
590 # Microsoft Excel Worksheet
592 Open=@EXTHELPERSDIR@/doc.sh open msxls
593 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msxls
594 type/^Microsoft\ Excel
595 Open=@EXTHELPERSDIR@/doc.sh open msxls
596 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msxls
599 Open=@EXTHELPERSDIR@/doc.sh open msppt
600 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msppt
602 # Use OpenOffice.org to open any MS Office documents
603 type/^Microsoft\ Office\ Document
604 Open=@EXTHELPERSDIR@/doc.sh open ooffice
608 Open=@EXTHELPERSDIR@/doc.sh open framemaker
612 Open=@EXTHELPERSDIR@/doc.sh open dvi
613 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view dvi
621 Open=@EXTHELPERSDIR@/doc.sh open djvu
622 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view djvu
626 Open=@EXTHELPERSDIR@/doc.sh open comic
629 regex/i/\.(epub|mobi)$
630 Open=@EXTHELPERSDIR@/doc.sh open epub
631 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view epub
634 ### Miscellaneous ###
636 # Compiled Java classes
638 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view javaclass
642 Open=make -f %f %{Enter parameters}
648 # Makefile.PL (MakeMaker)
649 regex/^Makefile\.(PL|pl)$
650 Open=%var{PERL:perl} %f
653 type/^SQLite 3.x database
654 Open=@EXTHELPERSDIR@/misc.sh open sqlite
655 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view sqlite
659 Open=@EXTHELPERSDIR@/misc.sh open dbf
660 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view dbf
664 Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
666 # Disk images for Commodore computers (VIC20, C64, C128)
668 Open=%cd %p/uc1541://
669 View=%view{ascii} c1541 %f -list
670 Extract=c1541 %f -extract
672 # Glade, a user interface designer for GTK+ and GNOME
674 Open=@EXTHELPERSDIR@/misc.sh open glade
678 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view mo
682 Open=@EXTHELPERSDIR@/misc.sh open po
686 Open=@EXTHELPERSDIR@/misc.sh open lyx
687 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view lyx
691 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view torrent
693 ### Plain compressed files ###
698 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view ace
704 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view arc
706 Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
711 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zip
716 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zip
719 type/i/^Java\ (Jar\ file|archive)\ data\ \((zip|JAR)\)
721 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zip
726 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zoo
730 Open=@EXTHELPERSDIR@/archive.sh view gz %var{PAGER:more}
731 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
734 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
738 Open=@EXTHELPERSDIR@/archive.sh view bzip2 %var{PAGER:more}
739 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
742 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
746 Open=@EXTHELPERSDIR@/archive.sh view bzip %var{PAGER:more}
747 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bzip
751 Open=@EXTHELPERSDIR@/archive.sh view gz %var{PAGER:more}
752 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
756 Open=@EXTHELPERSDIR@/archive.sh view lz4 %var{PAGER:more}
757 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lz4
761 Open=@EXTHELPERSDIR@/archive.sh view lzma %var{PAGER:more}
762 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lzma
766 Open=@EXTHELPERSDIR@/archive.sh view xz %var{PAGER:more}
767 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view xz
770 type/^Parity\ Archive\ Volume\ Set
771 Open=@EXTHELPERSDIR@/archive.sh open par2
775 # Default target for anything not described above