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 # regex (desc is an extended regular expression)
16 # Please note that we are using the GNU regex library and thus
17 # \| matches the literal | and | has special meaning (or) and
18 # () have special meaning and \( \) stand for literal ( ).
20 # type (file matches this if `file %f` matches regular expression desc
21 # (the filename: part from `file %f` is removed))
23 # directory (matches any directory matching regular expression desc)
25 # include (matches an include directive)
27 # default (matches any file no matter what desc is)
29 # Other lines should start with a space or tab and should be in the format:
31 # keyword=commandNL (with no spaces around =), where keyword should be:
33 # Open (if the user presses Enter or doubleclicks it),
35 # View (F3), Edit (F4)
37 # Include is the keyword used to add any further entries from an include/
40 # command is any one-line shell command, with the following substitutions:
43 # %p -> name of the current file (without path, but pwd is its path).
44 # Also provided to external application as MC_EXT_BASENAME
46 # %f -> name of the current file. Unlike %p, if file is located on a
47 # non-local virtual filesystem, i.e. either tarfs or ftpfs,
48 # then the file will be temporarily copied into a local directory
49 # and %f will be the full path to this local temporal file.
50 # If you don't want to get a local copy and want to get the
51 # virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then
52 # use %d/%p instead of %f.
53 # Also provided to external application as MC_EXT_FILENAME
55 # %d -> name of the current directory (pwd, without trailing slash)
56 # Also provided to external application as MC_EXT_CURRENTDIR
58 # %s -> "selected files", i.e. space separated list of tagged files if any
59 # or name of the current file.
60 # Also provided to external application as MC_EXT_SELECTED
62 # %t -> list of tagged files
63 # Also provided to external application as MC_EXT_ONLYTAGGED
65 # %u -> list of tagged files (they'll be untaged after the command)
67 # (If these 6 letters are in uppercase, they refer to the other panel.
68 # But you shouldn't have to use it in this file.)
71 # %cd -> the rest is a path mc should change into (cd won't work, since it's
72 # a child process). %cd handles even vfs names.
74 # %view -> the command you type will be piped into mc's internal file viewer
75 # if you type only the %view and no command, viewer will load %f file
76 # instead (i.e. no piping, so it is different to %view cat %f)
77 # %view may be directly followed by {} with a list of any of
78 # ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for
79 # text using backspace for bold and underscore) and unform
80 # (no highlighting for nroff sequences) separated by commas.
82 # %var -> You use it like this: %var{VAR:default}. This macro will expand
83 # to the value of the VAR variable in the environment if it's set
84 # otherwise the value in default will be used. This is similar to
85 # the Bourne shell ${VAR-default} construct.
87 # Rules are applied from top to bottom, thus the order is important.
88 # If some actions are missing, search continues as if this target didn't
89 # match (i.e. if a file matches the first and second entry and View action
90 # is missing in the first one, then on pressing F3 the View action from
91 # the second entry will be used. default should catch all the actions.
93 # Any new entries you develop for you are always welcome if they are
94 # useful on more than one system. You can post your modifications
95 # as tickets at www.midnight-commander.org
100 # Reorganization: 2000-05-01 Michal Svec <rebel@penguin.cz>
105 # Postscript Open: ps2svga [gs -DEVICE=jpeg|zgv or something]
108 # All X Apps [Nothing/Warning] if no DISPLAY
109 # Not found [Default/Warning]
110 # Empty Output [Default/Warning]
111 # Edit: CopyOut+EDIT+CopyIn
112 # Security Check gzip/bzip EDIT (mktemp)
114 # Maybe: Open/XOpen/GOpen/KOpen/... for Console/X/GNOME/KDE/etc.
120 Open=%cd %p/changesetfs://
121 View=%cd %p/patchsetfs://
125 # .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk
126 regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk|\.gem$
128 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.gz
131 # Open=%cd %p/utar://
132 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.bzip
134 regex/\.t(ar\.bz2|bz2?|b2)$
136 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.bzip2
139 regex/\.t(ar\.lzma|lz)$
141 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lzma
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/\.a(rj|[0-9][0-9])$
171 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view arj
174 regex/\.([cC][aA][bB])$
176 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cab
181 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view ha
184 regex/\.[rR]([aA][rR]|[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.xz
204 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.gz
208 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio
210 # 7zip archives (they are not man pages)
213 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view 7z
216 regex/\.(diff|patch)(\.bz2)$
217 Open=%cd %p/patchfs://
218 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
220 regex/\.(diff|patch)(\.(gz|Z))$
221 Open=%cd %p/patchfs://
222 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
225 regex/(^|\.)ls-?lR(\.gz|Z|bz2)$
231 View=%view{ascii} @EXTHELPERSDIR@/package.sh view trpm
233 # RPM packages (SuSE uses *.spm for source packages)
234 regex/\.(src\.rpm|spm)$
236 View=%view{ascii} @EXTHELPERSDIR@/package.sh view src.rpm
240 View=%view{ascii} @EXTHELPERSDIR@/package.sh view rpm
245 View=%view{ascii} @EXTHELPERSDIR@/package.sh view deb
250 View=%view{ascii} @EXTHELPERSDIR@/package.sh view debd
255 View=%view{ascii} @EXTHELPERSDIR@/package.sh view deba
258 regex/\.([iI][sS][oO])$
259 Open=%cd %p/iso9660://
260 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view iso9660
263 regex/\.(diff|patch)$
264 Open=%cd %p/patchfs://
265 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view cat
270 #Open=%view{ascii} ar tv %f
271 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view ar
274 regex/\.([Ll][Ii][Bb])$
276 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view lib
280 type/^ASCII\ mail\ text
281 Open=%cd %p/mailfs://
307 Open=%var{EDITOR:vi} %f
310 regex/\.(so|so\.[0-9\.]*)$
311 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view so
315 #Open=%var{PAGER:more} %f
316 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view elf
318 ### Documentation ###
321 #regex/\.(te?xi|texinfo)$
325 Open=@EXTHELPERSDIR@/text.sh open info
328 Open=@EXTHELPERSDIR@/text.sh open info
330 # Exception: .3gp are video files not manual pages
335 regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
336 Open=@EXTHELPERSDIR@/text.sh open man %var{PAGER:more}
337 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man %var{PAGER:more}
341 Open=@EXTHELPERSDIR@/text.sh open pod %var{PAGER:more}
342 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view pod %var{PAGER:more}
344 # Troff with me macros.
345 # Exception - "read.me" is not a nroff file.
351 Open=@EXTHELPERSDIR@/text.sh open nroff.me %var{PAGER:more}
352 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view nroff.me %var{PAGER:more}
354 # Troff with ms macros.
356 Open=@EXTHELPERSDIR@/text.sh open nroff.ms %var{PAGER:more}
357 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view nroff.ms %var{PAGER:more}
359 # Manual page - compressed
360 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
361 Open=@EXTHELPERSDIR@/text.sh open man.gz %var{PAGER:more}
362 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.gz %var{PAGER:more}
364 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
365 Open=@EXTHELPERSDIR@/text.sh open man.bz %var{PAGER:more}
366 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.bz %var{PAGER:more}
368 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
369 Open=@EXTHELPERSDIR@/text.sh open man.bz2 %var{PAGER:more}
370 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.bz2 %var{PAGER:more}
372 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
373 Open=@EXTHELPERSDIR@/text.sh open man.lzma %var{PAGER:more}
374 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lzma %var{PAGER:more}
376 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
377 Open=@EXTHELPERSDIR@/text.sh open man.xz %var{PAGER:more}
378 View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.xz %var{PAGER:more}
382 Open=@EXTHELPERSDIR@/text.sh open chm
390 View=%view{ascii} @EXTHELPERSDIR@/image.sh view jpeg
415 Open=@EXTHELPERSDIR@/image.sh open xcf
418 Open=@EXTHELPERSDIR@/image.sh open xbm
422 View=@EXTHELPERSDIR@/image.sh view xpm %f
428 Open=@EXTHELPERSDIR@/image.sh open ALL_FORMATS
429 View=%view{ascii} @EXTHELPERSDIR@/image.sh view ALL_FORMATS
434 regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$
435 Open=@EXTHELPERSDIR@/sound.sh open common
437 regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$
438 Open=@EXTHELPERSDIR@/sound.sh open mod
440 regex/\.([wW][aA][wW]22)$
441 Open=@EXTHELPERSDIR@/sound.sh open wav22
444 Open=@EXTHELPERSDIR@/sound.sh open mp3
445 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view mp3
447 regex/\.([oO][gG][gG|aA|vV|xX])$
448 Open=@EXTHELPERSDIR@/sound.sh open ogg
449 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view ogg
451 regex/\.([sS][pP][xX]|[fF][lL][aA][cC])$
452 Open=@EXTHELPERSDIR@/sound.sh open common
454 regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$
455 Open=@EXTHELPERSDIR@/sound.sh open midi
457 regex/\.([wW][mM][aA])$
458 Open=@EXTHELPERSDIR@/sound.sh open wma
459 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view wma
464 regex/\.([mM]3[uU]|[pP][lL][sS])$
465 Open=@EXTHELPERSDIR@/sound.sh open playlist
470 regex/\.([aA][vV][iI])$
473 regex/\.([aA][sS][fFxX])$
476 regex/\.([dD][iI][vV][xX])$
479 regex/\.([mM][kK][vV])$
482 regex/\.([mM][oO][vV]|[qQ][tT])$
485 regex/\.([mM][pP]4|[mM]4[vV]|[mM][pP][eE]?[gG])$
488 # MPEG-2 TS container + H.264 codec
489 regex/\.([mM][tT][sS])$
495 regex/\.([vV][oO][bB])$
498 regex/\.([wW][mM][vV])$
501 regex/\.([fF][lL][iIcCvV])$
504 regex/\.([oO][gG][mM])$
507 regex/\.([rR][aA]?[mM])$
508 Open=@EXTHELPERSDIR@/video.sh open ram
511 regex/\.([wW][eE][bB][mM])$
518 Open=@EXTHELPERSDIR@/video.sh open ALL_FORMATS
525 Open=@EXTHELPERSDIR@/doc.sh open ps
526 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view ps
530 Open=@EXTHELPERSDIR@/doc.sh open pdf
531 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view pdf
534 regex/\.([hH][tT][mM][lL]?)$
535 Open=@EXTHELPERSDIR@/web.sh open html
536 View=%view{ascii} @EXTHELPERSDIR@/web.sh view html
540 Open=@EXTHELPERSDIR@/doc.sh open oofice
542 # StarOffice 6 and OpenOffice.org formats
543 regex/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
544 Open=@EXTHELPERSDIR@/doc.sh open oofice
545 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view odt
549 Open=@EXTHELPERSDIR@/doc.sh open abw
551 # Microsoft Word Document
552 regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
553 Open=@EXTHELPERSDIR@/doc.sh open msdoc
554 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msdoc
555 type/^Microsoft\ Word
556 Open=@EXTHELPERSDIR@/doc.sh open msdoc
557 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msdoc
560 regex/\.([rR][tT][fF])$
561 Open=@EXTHELPERSDIR@/doc.sh open msdoc
563 # Microsoft Excel Worksheet
564 regex/\.([xX][lL][sSwW])$
565 Open=@EXTHELPERSDIR@/doc.sh open msxls
566 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msxls
567 type/^Microsoft\ Excel
568 Open=@EXTHELPERSDIR@/doc.sh open msxls
569 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msxls
571 # Use OpenOffice.org to open any MS Office documents
572 type/^Microsoft\ Office\ Document
573 Open=@EXTHELPERSDIR@/doc.sh open oofice
577 Open=@EXTHELPERSDIR@/doc.sh open framemaker
580 regex/\.([dD][vV][iI])$
581 Open=@EXTHELPERSDIR@/doc.sh open dvi
582 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view dvi
585 regex/\.([Tt][Ee][Xx])$
589 regex/\.(djvu?|DJVU?)$
590 Open=@EXTHELPERSDIR@/doc.sh open djvu
591 View=%view{ascii} @EXTHELPERSDIR@/doc.sh view djvu
593 ### Miscellaneous ###
597 Open=make -f %f %{Enter parameters}
601 Open=@EXTHELPERSDIR@/misc.sh open imakefile
603 # Makefile.PL (MakeMaker)
604 regex/^Makefile.(PL|pl)$
605 Open=%var{PERL:perl} %f
608 regex/\.([dD][bB][fF])$
609 Open=%view{ascii} @EXTHELPERSDIR@/misc.sh open dbf
610 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view dbf
614 Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
616 # Disk images for Commodore computers (VIC20, C64, C128)
618 Open=%cd %p/uc1541://
619 View=%view{ascii} c1541 %f -list
620 Extract=c1541 %f -extract
622 # Glade, a user interface designer for GTK+ and GNOME
623 regex/\.([Gg][Ll][Aa][Dd][Ee])$
624 Open=@EXTHELPERSDIR@/misc.sh open glade
628 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view mo
632 Open=@EXTHELPERSDIR@/misc.sh open lyx
633 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view lyx
636 regex/\.([tT][oO][rR][rR][eE][nN][tT])$
637 View=%view{ascii} @EXTHELPERSDIR@/misc.sh view torrent
639 ### Plain compressed files ###
644 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view ace
650 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view arc
652 Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
655 type/^([Zz][Ii][Pp])\ archive
657 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zip
660 regex/\.([Zz][Oo][Oo])$
662 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zoo
666 Open=@EXTHELPERSDIR@/archive.sh view gz %var{PAGER:more}
667 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
670 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
674 Open=@EXTHELPERSDIR@/archive.sh view bzip2 %var{PAGER:more}
675 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
678 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2
682 Open=@EXTHELPERSDIR@/archive.sh view bzip %var{PAGER:more}
683 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bzip
687 Open=@EXTHELPERSDIR@/archive.sh view gz %var{PAGER:more}
688 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz
692 Open=@EXTHELPERSDIR@/archive.sh view lzma %var{PAGER:more}
693 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lzma
697 Open=@EXTHELPERSDIR@/archive.sh view xz %var{PAGER:more}
698 View=%view{ascii} @EXTHELPERSDIR@/archive.sh view xz
702 # Default target for anything not described above