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 # directory (matches any directory matching regular expression desc)
31 # include (matches an include directive)
33 # default (matches any file no matter what desc is)
35 # Other lines should start with a space or tab and should be in the format:
37 # keyword=commandNL (with no spaces around =), where keyword should be:
39 # Open (if the user presses Enter or doubleclicks it),
41 # View (F3), Edit (F4)
43 # Include is the keyword used to add any further entries from an include/
46 # command is any one-line shell command, with the following substitutions:
49 # %p -> name of the current file (without path, but pwd is its path).
50 # Also provided to external application as MC_EXT_BASENAME
52 # %f -> name of the current file. Unlike %p, if file is located on a
53 # non-local virtual filesystem, i.e. either tarfs or ftpfs,
54 # then the file will be temporarily copied into a local directory
55 # and %f will be the full path to this local temporal file.
56 # If you don't want to get a local copy and want to get the
57 # virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then
58 # use %d/%p instead of %f.
59 # Also provided to external application as MC_EXT_FILENAME
61 # %d -> name of the current directory (pwd, without trailing slash)
62 # Also provided to external application as MC_EXT_CURRENTDIR
64 # %s -> "selected files", i.e. space separated list of tagged files if any
65 # or name of the current file.
66 # Also provided to external application as MC_EXT_SELECTED
68 # %t -> list of tagged files
69 # Also provided to external application as MC_EXT_ONLYTAGGED
71 # %u -> list of tagged files (they'll be untaged after the command)
73 # (If these 6 letters are in uppercase, they refer to the other panel.
74 # But you shouldn't have to use it in this file.)
77 # %cd -> the rest is a path mc should change into (cd won't work, since it's
78 # a child process). %cd handles even vfs names.
80 # %view -> the command you type will be piped into mc's internal file viewer
81 # if you type only the %view and no command, viewer will load %f file
82 # instead (i.e. no piping, so it is different to %view cat %f)
83 # %view may be directly followed by {} with a list of any of
84 # ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for
85 # text using backspace for bold and underscore) and unform
86 # (no highlighting for nroff sequences) separated by commas.
88 # %var -> You use it like this: %var{VAR:default}. This macro will expand
89 # to the value of the VAR variable in the environment if it's set
90 # otherwise the value in default will be used. This is similar to
91 # the Bourne shell ${VAR-default} construct.
93 # Rules are applied from top to bottom, thus the order is important.
94 # If some actions are missing, search continues as if this target didn't
95 # match (i.e. if a file matches the first and second entry and View action
96 # is missing in the first one, then on pressing F3 the View action from
97 # the second entry will be used. default should catch all the actions.
99 # Any new entries you develop for you are always welcome if they are
100 # useful on more than one system. You can post your modifications
101 # as tickets at www.midnight-commander.org
106 # Reorganization: 2012-03-07 Slava Zanko <slavazanko@gmail.com>
112 Open=%cd %p/changesetfs://
113 View=%cd %p/patchsetfs://
117 # .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk
118 regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk|\.gem$
120 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.gz
123 # Open=%cd %p/utar://
124 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.bzip
126 regex/\.t(ar\.bz2|bz2?|b2)$
128 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.bzip2
131 regex/\.t(ar\.lzma|lz)$
133 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lzma
136 regex/\.t(ar\.xz|xz)$
138 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.xz
140 # .tar.F - used in QNX
142 # Open=%cd %p/utar://
143 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.F
145 # .qpr/.qpk - QNX Neutrino package installer files
148 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.qpr
153 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar
158 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lha
161 regex/i/\.a(rj|[0-9][0-9])$
163 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view arj
168 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cab
173 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view ha
176 regex/i/\.r(ar|[0-9][0-9])$
178 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view rar
183 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view alz
188 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.z
192 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.xz
196 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.gz
200 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio
202 # 7zip archives (they are not man pages)
205 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view 7z
208 regex/\.(diff|patch)(\.bz2)$
209 Open=%cd %p/patchfs://
210 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
212 regex/\.(diff|patch)(\.(gz|Z))$
213 Open=%cd %p/patchfs://
214 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
217 regex/(^|\.)ls-?lR(\.gz|Z|bz2)$
223 View=%view{ascii} @EXTHELPERSDIR@/package.sh view trpm
225 # RPM packages (SuSE uses *.spm for source packages)
226 regex/\.(src\.rpm|spm)$
228 View=%view{ascii} @EXTHELPERSDIR@/package.sh view src.rpm
232 View=%view{ascii} @EXTHELPERSDIR@/package.sh view rpm
237 View=%view{ascii} @EXTHELPERSDIR@/package.sh view deb
242 View=%view{ascii} @EXTHELPERSDIR@/package.sh view debd
247 View=%view{ascii} @EXTHELPERSDIR@/package.sh view deba
251 Open=%cd %p/iso9660://
252 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view iso9660
255 regex/\.(diff|patch)$
256 Open=%cd %p/patchfs://
257 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view cat
262 #Open=%view{ascii} ar tv %f
263 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view ar
268 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view lib
272 type/^ASCII\ mail\ text
273 Open=%cd %p/mailfs://
299 Open=%var{EDITOR:vi} %f
302 regex/\.(so|so\.[0-9\.]*)$
303 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view so
307 #Open=%var{PAGER:more} %f
308 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view elf
310 ### Documentation ###
313 #regex/\.(te?xi|texinfo)$
317 Open=@EXTHELPERSDIR@/text.sh open info
320 Open=@EXTHELPERSDIR@/text.sh open info
322 # Exception: .3gp are video files not manual pages
327 regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
328 Open=@EXTHELPERSDIR@/text.sh open man %var{PAGER:more}
329 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man %var{PAGER:more}
333 Open=@EXTHELPERSDIR@/text.sh open pod %var{PAGER:more}
334 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view pod %var{PAGER:more}
336 # Troff with me macros.
337 # Exception - "read.me" is not a nroff file.
343 Open=@EXTHELPERSDIR@/text.sh open nroff.me %var{PAGER:more}
344 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view nroff.me %var{PAGER:more}
346 # Troff with ms macros.
348 Open=@EXTHELPERSDIR@/text.sh open nroff.ms %var{PAGER:more}
349 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view nroff.ms %var{PAGER:more}
351 # Manual page - compressed
352 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
353 Open=@EXTHELPERSDIR@/text.sh open man.gz %var{PAGER:more}
354 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.gz %var{PAGER:more}
356 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
357 Open=@EXTHELPERSDIR@/text.sh open man.bz %var{PAGER:more}
358 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.bz %var{PAGER:more}
360 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
361 Open=@EXTHELPERSDIR@/text.sh open man.bz2 %var{PAGER:more}
362 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.bz2 %var{PAGER:more}
364 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
365 Open=@EXTHELPERSDIR@/text.sh open man.lzma %var{PAGER:more}
366 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lzma %var{PAGER:more}
368 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
369 Open=@EXTHELPERSDIR@/text.sh open man.xz %var{PAGER:more}
370 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.xz %var{PAGER:more}
374 Open=@EXTHELPERSDIR@/text.sh open chm
382 View=%view{ascii} @EXTHELPERSDIR@/image.sh view jpeg
407 Open=@EXTHELPERSDIR@/image.sh open xcf
410 Open=@EXTHELPERSDIR@/image.sh open xbm
414 View=@EXTHELPERSDIR@/image.sh view xpm %f
420 Open=@EXTHELPERSDIR@/image.sh open ALL_FORMATS
421 View=%view{ascii} @EXTHELPERSDIR@/image.sh view ALL_FORMATS
426 regex/i/\.(wav|snd|voc|au|smp|aiff|snd)$
427 Open=@EXTHELPERSDIR@/sound.sh open common
429 regex/i/\.(mod|s3m|xm|it|mtm|669|stm|ult|far)$
430 Open=@EXTHELPERSDIR@/sound.sh open mod
433 Open=@EXTHELPERSDIR@/sound.sh open wav22
436 Open=@EXTHELPERSDIR@/sound.sh open mp3
437 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view mp3
440 Open=@EXTHELPERSDIR@/sound.sh open ogg
441 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view ogg
443 regex/i/\.(spx|flac)$
444 Open=@EXTHELPERSDIR@/sound.sh open common
446 regex/i/\.(midi?|rmid?)$
447 Open=@EXTHELPERSDIR@/sound.sh open midi
450 Open=@EXTHELPERSDIR@/sound.sh open wma
451 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view wma
457 Open=@EXTHELPERSDIR@/sound.sh open playlist
477 regex/i/\.(mp4|m4v|mpe?g)$
480 # MPEG-2 TS container + H.264 codec
500 Open=@EXTHELPERSDIR@/video.sh open ram
510 Open=@EXTHELPERSDIR@/video.sh open ALL_FORMATS
511 View=%view{ascii} @EXTHELPERSDIR@/video.sh view ALL_FORMATS
518 Open=@EXTHELPERSDIR@/doc.sh open ps
519 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view ps
523 Open=@EXTHELPERSDIR@/doc.sh open pdf
524 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view pdf
528 Open=@EXTHELPERSDIR@/web.sh open html
529 View=%view{ascii} @EXTHELPERSDIR@/web.sh view html
533 Open=@EXTHELPERSDIR@/doc.sh open ooffice
535 # StarOffice 6 and OpenOffice.org formats
536 regex/i/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
537 Open=@EXTHELPERSDIR@/doc.sh open ooffice
538 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view odt
542 Open=@EXTHELPERSDIR@/doc.sh open abw
544 # Microsoft Word Document
545 regex/i/\.(do[ct]|wri)$
546 Open=@EXTHELPERSDIR@/doc.sh open msdoc
547 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msdoc
548 type/^Microsoft\ Word
549 Open=@EXTHELPERSDIR@/doc.sh open msdoc
550 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msdoc
554 Open=@EXTHELPERSDIR@/doc.sh open msdoc
556 # Microsoft Excel Worksheet
558 Open=@EXTHELPERSDIR@/doc.sh open msxls
559 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msxls
560 type/^Microsoft\ Excel
561 Open=@EXTHELPERSDIR@/doc.sh open msxls
562 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msxls
564 # Use OpenOffice.org to open any MS Office documents
565 type/^Microsoft\ Office\ Document
566 Open=@EXTHELPERSDIR@/doc.sh open ooffice
570 Open=@EXTHELPERSDIR@/doc.sh open framemaker
574 Open=@EXTHELPERSDIR@/doc.sh open dvi
575 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view dvi
583 Open=@EXTHELPERSDIR@/doc.sh open djvu
584 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view djvu
586 ### Miscellaneous ###
590 Open=make -f %f %{Enter parameters}
594 Open=@EXTHELPERSDIR@/misc.sh open imakefile
596 # Makefile.PL (MakeMaker)
597 regex/^Makefile.(PL|pl)$
598 Open=%var{PERL:perl} %f
602 Open=%view{ascii} @EXTHELPERSDIR@/misc.sh open dbf
603 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view dbf
607 Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
609 # Disk images for Commodore computers (VIC20, C64, C128)
611 Open=%cd %p/uc1541://
612 View=%view{ascii} c1541 %f -list
613 Extract=c1541 %f -extract
615 # Glade, a user interface designer for GTK+ and GNOME
617 Open=@EXTHELPERSDIR@/misc.sh open glade
621 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view mo
625 Open=@EXTHELPERSDIR@/misc.sh open lyx
626 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view lyx
630 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view torrent
632 ### Plain compressed files ###
637 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view ace
643 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view arc
645 Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
648 type/^([Zz][Ii][Pp])\ archive
650 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zip
655 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zoo
659 Open=@EXTHELPERSDIR@/archive.sh view gz %var{PAGER:more}
660 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
663 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
667 Open=@EXTHELPERSDIR@/archive.sh view bzip2 %var{PAGER:more}
668 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
671 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
675 Open=@EXTHELPERSDIR@/archive.sh view bzip %var{PAGER:more}
676 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bzip
680 Open=@EXTHELPERSDIR@/archive.sh view gz %var{PAGER:more}
681 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
685 Open=@EXTHELPERSDIR@/archive.sh view lzma %var{PAGER:more}
686 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lzma
690 Open=@EXTHELPERSDIR@/archive.sh view xz %var{PAGER:more}
691 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view xz
695 # Default target for anything not described above