]> git.phdru.name Git - dotfiles.git/blob - .mc/mc.ext
.mc/mc.ext: Use `cat` with `%view{ascii}`
[dotfiles.git] / .mc / mc.ext
1 ### phd
2
3 type/^Berkeley\ DB\ 1.85
4    View=%view{ascii} db_dump185 -p %f
5
6 # Compiled HTML
7 #shell/.chm
8 #   Open=fbreader %f &
9 #
10 ## DejaVu
11 #shell/.djvu
12 #   Open=djview %f &
13 #
14 # EPUB
15 shell/.epub
16    Open=fbreader %f &
17
18 # FB2
19 shell/.fb2
20    Open=fbreader %f &
21    View=%view{ascii} xsltproc /usr/local/src/distr/FictionBook/FB2_2_txt_ru.xsl %f
22
23 #type/^PostScript
24 #   Open=libreoffice %f &
25 #   View=%view{ascii} ps2ascii %f
26 #
27 ## RTF
28 #regex/i/\.rtf$
29 #   Open=fbreader %f &
30 #   View=%view{ascii} catdoc %f
31 #
32 #regex/i/\.(doc|wri)$
33 #   Include=msoffice-doc
34 #
35 regex/i/\.docx$
36    Edit=libreoffice %f &
37    Open=libreoffice %f &
38    View=%view{ascii} docx2txt %f - | iconv.py -f utf-8
39
40 type/^Microsoft\ Word 2007+
41    Include=msoffice-doc
42
43 type/^Microsoft\ Office\ Document
44    Include=msoffice-doc
45
46 regex/i/\.xlsx$
47    Include=msoffice-xlsx
48
49 type/^Microsoft\ Excel 2007+
50    Include=msoffice-xlsx
51
52 #type/^Composite\ Document\ File
53 #   Include=msoffice-doc
54 #
55 # ftplist
56 regex/\.ftplist$
57    Open=%cd %p#ftplist
58
59 # Play list
60 regex/i/\.(m3u|pls)$
61    Include=audio
62
63 # Lossless audio
64 regex/\.(cue|aac|ac3|ape|flac|wv|mka)$
65    Include=audio
66
67 ## Object
68 #shell/.o
69 #   View=%view{ascii} nm %f
70 #   Disassemble=%view{ascii} objdump -d -r %f
71 #
72 ## Python
73 #shell/.py
74 #   Open=python %f
75 #   View=%view{ascii} cat %f
76 #   Compile=compyle %s
77 #   Icon=snake.xpm
78 #
79 #regex/i/\.tiff?$
80 #   Open=xview %f
81 #
82 shell/.torrent
83    Open=%cd %p/torrent://
84
85 regex/i/\.xml$
86    Include=xml
87
88 type/^XML *(1\.0 *)?document
89    Include=xml
90
91 #regex/i/\.zip$
92 #   Open=%cd %p/uzip://
93 #   View=%view{ascii} unzip -v %f
94 #
95 include/audio
96    Open=[ "`audtool --get-volume`" -eq 0 ] && (audacious & sleep 3); audtool --playlist-clear; case %f in *.m3u) while read song; do audtool --playlist-addurl "$song"; done < %f ;; *) audtool --playlist-addurl %f ;; esac; audtool --playback-play
97    #Open=mplayer %f &
98    #Open=deadbeef %f &
99    View=%view{ascii} cat %f
100
101 include/msoffice-doc
102    Edit=libreoffice %f &
103    Open=libreoffice %f &
104    View=%view{ascii} catdoc %f
105
106 include/msoffice-xlsx
107    Edit=libreoffice %f &
108    Open=libreoffice %f &
109    View=%view{ascii} xlsx2csv %f | iconv.py -f utf-8
110
111 #include/video
112 #   Open=mplayer %f &
113 #   View=%view{ascii} cat %f
114 #
115 include/xml
116    Open=%cd %p/xml://
117
118 ### /phd
119
120 # Midnight Commander 3.0 extension file
121 # Warning: Structure of this file has changed completely with version 3.0
122 #
123 # All lines starting with # or empty lines are thrown away.
124 # Lines starting in the first column should have following format:
125 #
126 # keyword/descNL, i.e. everything after keyword/ until new line is desc
127 #
128 # keyword can be:
129 #
130 #    shell (desc is, when starting with a dot, any extension (no wildcars),
131 #          i.e. matches all the files *desc . Example: .tar matches *.tar;
132 #          if it doesn't start with a dot, it matches only a file of that name)
133 #
134 #    shell/i (desc is, when starting with a dot, any extension (no wildcars),
135 #          The same as shell but with case insensitive.
136 #
137 #    regex (desc is an extended regular expression)
138 #          Please note that we are using the GNU regex library and thus
139 #          \| matches the literal | and | has special meaning (or) and
140 #          () have special meaning and \( \) stand for literal ( ).
141 #
142 #    regex/i (desc is an extended regular expression)
143 #          The same as regex but with case insensitive.
144 #
145 #    type  (file matches this if `file %f` matches regular expression desc
146 #          (the filename: part from `file %f` is removed))
147 #
148 #    type/i (file matches this if `file %f` matches regular expression desc)
149 #          The same as type but with case insensitive.
150 #
151 #    directory (matches any directory matching regular expression desc)
152 #
153 #    include (matches an include directive)
154 #
155 #    default (matches any file no matter what desc is)
156 #
157 # Other lines should start with a space or tab and should be in the format:
158 #
159 # keyword=commandNL (with no spaces around =), where keyword should be:
160 #
161 #    Open (if the user presses Enter or doubleclicks it),
162 #
163 #    View (F3), Edit (F4)
164 #
165 #    Include is the keyword used to add any further entries from an include/
166 #    section
167 #
168 # command is any one-line shell command, with the following substitutions:
169 #
170 # %% -> % character
171 # %p -> name of the current file (without path, but pwd is its path).
172 #       Also provided to external application as MC_EXT_BASENAME
173 #       global variable
174 # %f -> name of the current file. Unlike %p, if file is located on a
175 #       non-local virtual filesystem, i.e. either tarfs or ftpfs,
176 #       then the file will be temporarily copied into a local directory
177 #       and %f will be the full path to this local temporal file.
178 #       If you don't want to get a local copy and want to get the
179 #       virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then
180 #       use %d/%p instead of %f.
181 #       Also provided to external application as MC_EXT_FILENAME
182 #       global variable
183 # %d -> name of the current directory (pwd, without trailing slash)
184 #       Also provided to external application as MC_EXT_CURRENTDIR
185 #       global variable
186 # %s -> "selected files", i.e. space separated list of tagged files if any
187 #       or name of the current file.
188 #       Also provided to external application as MC_EXT_SELECTED
189 #       global variable
190 # %t -> list of tagged files
191 #       Also provided to external application as MC_EXT_ONLYTAGGED
192 #       global variable
193 # %u -> list of tagged files (they'll be untaged after the command)
194 #
195 # (If these 6 letters are in uppercase, they refer to the other panel.
196 # But you shouldn't have to use it in this file.)
197 #
198 #
199 # %cd -> the rest is a path mc should change into (cd won't work, since it's
200 #       a child process).  %cd handles even vfs names.
201 #
202 # %view -> the command you type will be piped into mc's internal file viewer
203 #       if you type only the %view and no command, viewer will load %f file
204 #       instead (i.e. no piping, so it is different to %view cat %f)
205 #       %view may be directly followed by {} with a list of any of
206 #       ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for
207 #       text using backspace for bold and underscore) and unform
208 #       (no highlighting for nroff sequences) separated by commas.
209 #
210 # %var -> You use it like this: %var{VAR:default}.  This macro will expand
211 #       to the value of the VAR variable in the environment if it's set
212 #       otherwise the value in default will be used.  This is similar to
213 #       the Bourne shell ${VAR-default} construct.
214 #
215 # Rules are applied from top to bottom, thus the order is important.
216 # If some actions are missing, search continues as if this target didn't
217 # match (i.e. if a file matches the first and second entry and View action
218 # is missing in the first one, then on pressing F3 the View action from
219 # the second entry will be used. default should catch all the actions.
220 #
221 # Any new entries you develop for you are always welcome if they are
222 # useful on more than one system.  You can post your modifications
223 # as tickets at www.midnight-commander.org
224
225
226 ### Changes ###
227 #
228 # Reorganization: 2012-03-07 Slava Zanko <slavazanko@gmail.com>
229
230
231 ### GIT Repo ###
232 # gitfs changeset
233 regex/^\[git\]
234         Open=%cd %p/changesetfs://
235         View=%cd %p/patchsetfs://
236
237 ### Archives ###
238
239 # .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk, .gem
240 regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$|\.gem$
241         Open=%cd %p/utar://
242         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.gz
243
244 shell/.tar.bz
245         # Open=%cd %p/utar://
246         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.bzip
247
248 regex/\.t(ar\.bz2|bz2?|b2)$
249         Open=%cd %p/utar://
250         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.bzip2
251
252 # .tar.lzma, .tlz
253 regex/\.t(ar\.lzma|lz)$
254         Open=%cd %p/utar://
255         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.lzma
256
257 # .tar.lz
258 shell/.tar.lz
259         Open=%cd %p/utar://
260         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.lz
261
262 # .tar.lz4, .tlz4
263 regex/\.t(ar\.lz4|lz4)$
264         Open=%cd %p/utar://
265         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.lz4
266
267 # .tar.xz, .txz
268 regex/\.t(ar\.xz|xz)$
269         Open=%cd %p/utar://
270         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.xz
271
272 # .tar.zst, .tzst
273 regex/\.t(ar\.zst|zst)$
274         Open=%cd %p/utar://
275         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.zst
276
277 # .tar.F - used in QNX
278 shell/.tar.F
279         # Open=%cd %p/utar://
280         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.F
281
282 # .qpr/.qpk - QNX Neutrino package installer files
283 regex/\.qp[rk]$
284         Open=%cd %p/utar://
285         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar.qpr
286
287 # tar
288 shell/i/.tar
289         Open=%cd %p/utar://
290         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view tar
291
292 # lha
293 type/^LHa\ .*archive
294         Open=%cd %p/ulha://
295         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view lha
296
297 # arj
298 regex/i/\.a(rj|[0-9][0-9])$
299         Open=%cd %p/uarj://
300         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view arj
301
302 # cab
303 shell/i/.cab
304         Open=%cd %p/ucab://
305         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view cab
306
307 # ha
308 shell/i/.ha
309         Open=%cd %p/uha://
310         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view ha
311
312 # rar
313 regex/i/\.r(ar|[0-9][0-9])$
314         Open=%cd %p/urar://
315         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view rar
316
317 # ALZip
318 shell/i/.alz
319         Open=%cd %p/ualz://
320         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view alz
321
322 # cpio
323 shell/.cpio.Z
324         Open=%cd %p/ucpio://
325         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view cpio.z
326
327 shell/.cpio.lz
328         Open=%cd %p/ucpio://
329         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view cpio.lz
330
331 shell/.cpio.lz4
332         Open=%cd %p/ucpio://
333         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view cpio.lz4
334
335 shell/.cpio.xz
336         Open=%cd %p/ucpio://
337         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view cpio.xz
338
339 shell/.cpio.zst
340         Open=%cd %p/ucpio://
341         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view cpio.zst
342
343 shell/.cpio.gz
344         Open=%cd %p/ucpio://
345         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view cpio.gz
346
347 shell/i/.cpio
348         Open=%cd %p/ucpio://
349         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view cpio
350
351 # initrd
352 regex/^(initramfs.*\.img|initrd(-.+)?\.img(-.+)?)$
353         Open=%cd %p/ucpio://
354         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view cpio
355
356 # 7zip archives (they are not man pages)
357 shell/i/.7z
358         Open=%cd %p/u7z://
359         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view 7z
360
361 # patch
362 regex/\.(diff|patch)(\.bz2)$
363         Open=%cd %p/patchfs://
364         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view bz2
365
366 regex/\.(diff|patch)(\.(gz|Z))$
367         Open=%cd %p/patchfs://
368         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view gz
369
370 regex/\.(diff|patch)(\.xz)$
371     Open=%cd %p/patchfs://
372     View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view xz
373
374 regex/\.(diff|patch)(\.zst)$
375     Open=%cd %p/patchfs://
376     View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zst
377
378 # ls-lR
379 regex/(^|\.)ls-?lR(\.gz|Z|bz2)$
380         Open=%cd %p/lslR://
381
382 # trpm
383 shell/.trpm
384         Open=%cd %p/trpm://
385         View=%view{ascii} /usr/lib/mc/ext.d/package.sh view trpm
386
387 # RPM packages (SuSE uses *.spm for source packages)
388 regex/\.(src\.rpm|spm)$
389         Open=%cd %p/rpm://
390         View=%view{ascii} /usr/lib/mc/ext.d/package.sh view src.rpm
391
392 shell/.rpm
393         Open=%cd %p/rpm://
394         View=%view{ascii} /usr/lib/mc/ext.d/package.sh view rpm
395
396 # deb
397 regex/\.u?deb$
398         Open=%cd %p/deb://
399         View=%view{ascii} /usr/lib/mc/ext.d/package.sh view deb
400
401 # dpkg
402 shell/.debd
403         Open=%cd %p/debd://
404         View=%view{ascii} /usr/lib/mc/ext.d/package.sh view debd
405
406 # apt
407 shell/.deba
408         Open=%cd %p/deba://
409         View=%view{ascii} /usr/lib/mc/ext.d/package.sh view deba
410
411 # ISO9660
412 shell/i/.iso
413         Open=%cd %p/iso9660://
414         View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view iso9660
415
416
417 regex/\.(diff|patch)$
418         Open=%cd %p/patchfs://
419         View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view cat
420
421 # ar library
422 regex/\.s?a$
423         Open=%cd %p/uar://
424         #Open=%view{ascii} ar tv %f
425         View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view ar
426
427 # gplib
428 shell/i/.lib
429         Open=%cd %p/ulib://
430         View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view lib
431
432
433 # Mailboxes
434 type/^ASCII\ mail\ text
435         Open=%cd %p/mailfs://
436
437
438 ### Sources ###
439
440 # C/C++
441 regex/i/\.(c|cc|cpp)$
442         Include=editor
443
444 # C/C++ header
445 regex/i/\.(h|hh|hpp)$
446         Include=editor
447
448 # Fortran
449 shell/i/.f
450         Include=editor
451
452 # Assembler
453 regex/i/\.(s|asm)$
454         Include=editor
455
456 include/editor
457         Open=%var{EDITOR:editor} %f
458
459 # .so libraries
460 regex/\.(so|so\.[0-9\.]*)$
461         View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view so
462
463 # Object
464 type/^ELF
465         #Open=%var{PAGER:more} %f
466         View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view elf
467
468 ### Documentation ###
469
470 # Texinfo
471 #regex/\.(te?xi|texinfo)$
472
473 # GNU Info page
474 type/^Info\ text
475         Open=/usr/lib/mc/ext.d/text.sh open info
476
477 shell/.info
478         Open=/usr/lib/mc/ext.d/text.sh open info
479
480 # Exception: .3gp are video files not manual pages
481 shell/i/.3gp
482         Include=video
483
484 # Manual page
485 regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
486         Open=/usr/lib/mc/ext.d/text.sh open man %var{PAGER:more}
487         View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view man %var{PAGER:more}
488
489 # Perl pod page
490 shell/.pod
491         Open=/usr/lib/mc/ext.d/text.sh open pod %var{PAGER:more}
492         View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view pod %var{PAGER:more}
493
494 # Troff with me macros.
495 # Exception - "read.me" is not a nroff file.
496 shell/read.me
497         Open=
498         View=
499
500 shell/.me
501         Open=/usr/lib/mc/ext.d/text.sh open nroff.me %var{PAGER:more}
502         View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view nroff.me %var{PAGER:more}
503
504 # Troff with ms macros.
505 shell/.ms
506         Open=/usr/lib/mc/ext.d/text.sh open nroff.ms %var{PAGER:more}
507         View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view nroff.ms %var{PAGER:more}
508
509 # Manual page - compressed
510 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
511         Open=/usr/lib/mc/ext.d/text.sh open man.gz %var{PAGER:more}
512         View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view man.gz %var{PAGER:more}
513
514 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
515         Open=/usr/lib/mc/ext.d/text.sh open man.bz %var{PAGER:more}
516         View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view man.bz %var{PAGER:more}
517
518 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
519         Open=/usr/lib/mc/ext.d/text.sh open man.bz2 %var{PAGER:more}
520         View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view man.bz2 %var{PAGER:more}
521
522 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lz$
523         Open=/usr/lib/mc/ext.d/text.sh open man.lz %var{PAGER:more}
524         View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view man.lz %var{PAGER:more}
525
526 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lz4$
527         Open=/usr/lib/mc/ext.d/text.sh open man.lz4 %var{PAGER:more}
528         View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view man.lz4 %var{PAGER:more}
529
530 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
531         Open=/usr/lib/mc/ext.d/text.sh open man.lzma %var{PAGER:more}
532         View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view man.lzma %var{PAGER:more}
533
534 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
535         Open=/usr/lib/mc/ext.d/text.sh open man.xz %var{PAGER:more}
536         View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view man.xz %var{PAGER:more}
537
538 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.zst$
539         Open=/usr/lib/mc/ext.d/text.sh open man.zst %var{PAGER:more}
540         View=%view{ascii,nroff} /usr/lib/mc/ext.d/text.sh view man.zst %var{PAGER:more}
541
542 # CHM
543 shell/i/.chm
544         Open=/usr/lib/mc/ext.d/text.sh open chm
545
546 ### Images ###
547
548 type/^GIF
549         Include=image
550
551 type/^JPEG
552         View=%view{ascii} /usr/lib/mc/ext.d/image.sh view jpeg
553         Include=image
554
555 type/^PC\ bitmap
556         Include=image
557
558 type/^PNG
559         Include=image
560
561 type/^JNG
562         Include=image
563
564 type/^MNG
565         Include=image
566
567 type/^TIFF
568         Include=image
569
570 type/^PBM
571         Include=image
572
573 type/^PGM
574         Include=image
575
576 type/^PPM
577         Include=image
578
579 type/^Netpbm
580         Include=image
581
582 shell/.xcf
583         Open=/usr/lib/mc/ext.d/image.sh open xcf
584
585 shell/.xbm
586         Open=/usr/lib/mc/ext.d/image.sh open xbm
587
588 shell/.xpm
589         Include=image
590         View=/usr/lib/mc/ext.d/image.sh view xpm %f
591
592 shell/.ico
593         Include=image
594
595 shell/i/.svg
596         View=%view{ascii} /usr/lib/mc/ext.d/image.sh view svg
597         Open=/usr/lib/mc/ext.d/image.sh open svg
598
599 include/image
600         Open=/usr/lib/mc/ext.d/image.sh open ALL_FORMATS
601         View=%view{ascii} /usr/lib/mc/ext.d/image.sh view ALL_FORMATS
602
603
604 ### Sound files ###
605
606 regex/i/\.(wav|snd|voc|au|smp|aiff|snd|m4a|ape|aac|wv)$
607         Open=/usr/lib/mc/ext.d/sound.sh open common
608
609 regex/i/\.(mod|s3m|xm|it|mtm|669|stm|ult|far)$
610         Open=/usr/lib/mc/ext.d/sound.sh open mod
611
612 shell/i/.waw22
613         Open=/usr/lib/mc/ext.d/sound.sh open wav22
614
615 shell/i/.mp3
616         Open=/usr/lib/mc/ext.d/sound.sh open mp3
617         View=%view{ascii} /usr/lib/mc/ext.d/sound.sh view mp3
618
619 regex/i/\.og[gax]$
620         Open=/usr/lib/mc/ext.d/sound.sh open ogg
621         View=%view{ascii} /usr/lib/mc/ext.d/sound.sh view ogg
622
623 regex/i/\.(spx|flac)$
624         Open=/usr/lib/mc/ext.d/sound.sh open common
625
626 regex/i/\.(midi?|rmid?)$
627         Open=/usr/lib/mc/ext.d/sound.sh open midi
628
629 shell/i/.wma
630         Open=/usr/lib/mc/ext.d/sound.sh open wma
631         View=%view{ascii} /usr/lib/mc/ext.d/sound.sh view wma
632
633
634 ### Play lists ###
635
636 regex/i/\.(m3u|pls)$
637         Open=/usr/lib/mc/ext.d/sound.sh open playlist
638
639
640 ### Video ###
641
642 shell/i/.avi
643         Include=video
644
645 regex/i/\.as[fx]$
646         Include=video
647
648 shell/i/.divx
649         Include=video
650
651 shell/i/.mkv
652         Include=video
653
654 regex/i/\.(mov|qt)$
655         Include=video
656
657 regex/i/\.(mp4|m4v|mpe?g)$
658         Include=video
659
660 # MPEG-2 TS container + H.264 codec
661 shell/i/.mts
662         Include=video
663
664 shell/i/.ts
665         Include=video
666
667 shell/i/.vob
668         Include=video
669
670 shell/i/.wmv
671         Include=video
672
673 regex/i/\.fl[icv]$
674         Include=video
675
676 shell/i/.ogv
677         Include=video
678
679 regex/i/\.ra?m$
680         Open=/usr/lib/mc/ext.d/video.sh open ram
681
682 # WebM
683 shell/i/.webm
684     Include=video
685
686 type/WebM
687     Include=video
688
689 include/video
690         Open=/usr/lib/mc/ext.d/video.sh open ALL_FORMATS
691         View=%view{ascii} /usr/lib/mc/ext.d/video.sh view ALL_FORMATS
692
693
694 ### Documents ###
695
696 # Postscript
697 type/^PostScript
698         Open=/usr/lib/mc/ext.d/doc.sh open ps
699         View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view ps
700
701 # PDF
702 type/^PDF
703         Open=/usr/lib/mc/ext.d/doc.sh open pdf
704         View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view pdf
705
706 # html
707 regex/i/\.html?$
708         Open=/usr/lib/mc/ext.d/web.sh open html
709         View=%view{ascii} /usr/lib/mc/ext.d/web.sh view html
710
711 # StarOffice 5.2
712 shell/.sdw
713         Open=/usr/lib/mc/ext.d/doc.sh open ooffice
714
715 # StarOffice 6 and OpenOffice.org formats
716 regex/i/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
717         Open=/usr/lib/mc/ext.d/doc.sh open ooffice
718         View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view odt
719
720 # AbiWord
721 shell/.abw
722         Open=/usr/lib/mc/ext.d/doc.sh open abw
723
724 # Gnumeric
725 shell/i/.gnumeric
726         Open=/usr/lib/mc/ext.d/doc.sh open gnumeric
727
728 # Microsoft Word Document
729 regex/i/\.(do[ct]|wri|docx)$
730         Open=/usr/lib/mc/ext.d/doc.sh open msdoc
731         View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view msdoc
732 type/^Microsoft\ Word
733         Open=/usr/lib/mc/ext.d/doc.sh open msdoc
734         View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view msdoc
735
736 # RTF document
737 shell/i/.rtf
738         Open=/usr/lib/mc/ext.d/doc.sh open msdoc
739
740 # Microsoft Excel Worksheet
741 regex/i/\.(xl[sw]|xlsx)$
742         Open=/usr/lib/mc/ext.d/doc.sh open msxls
743         View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view msxls
744 type/^Microsoft\ Excel
745         Open=/usr/lib/mc/ext.d/doc.sh open msxls
746         View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view msxls
747
748 # Microsoft PowerPoint Presentation
749 regex/i/\.(pp[ts]|pptx)$
750         Open=/usr/lib/mc/ext.d/doc.sh open msppt
751         View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view msppt
752
753 # Use OpenOffice.org/LibreOffice to open any MS Office documents
754 type/^Microsoft\ Office\ Document
755         Open=/usr/lib/mc/ext.d/doc.sh open ooffice
756 type/^Microsoft\ OOXML
757         Open=/usr/lib/mc/ext.d/doc.sh open ooffice
758
759 # Framemaker
760 type/^FrameMaker
761         Open=/usr/lib/mc/ext.d/doc.sh open framemaker
762
763 # DVI
764 shell/i/.dvi
765         Open=/usr/lib/mc/ext.d/doc.sh open dvi
766         View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view dvi
767
768 # TeX
769 shell/i/.tex
770         Include=editor
771
772 # DjVu
773 regex/i/\.djvu?$
774         Open=/usr/lib/mc/ext.d/doc.sh open djvu
775         View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view djvu
776
777 # Comic Books
778 regex/i/\.cb[zr]$
779         Open=/usr/lib/mc/ext.d/doc.sh open comic
780
781 # Epub & mobi
782 regex/i/\.(epub|mobi)$
783         Open=/usr/lib/mc/ext.d/doc.sh open epub
784         View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view epub
785
786
787 ### Miscellaneous ###
788
789 # Compiled Java classes
790 shell/.class
791         View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view javaclass
792
793 # Makefile
794 regex/^[Mm]akefile$
795         Open=make -f %f %{Enter parameters}
796
797 # Imakefile
798 shell/Imakefile
799         Open=xmkmf -a
800
801 # Makefile.PL (MakeMaker)
802 regex/^Makefile\.(PL|pl)$
803         Open=%var{PERL:perl} %f
804
805 # sqlite3.db
806 type/^SQLite 3.x database
807         Open=/usr/lib/mc/ext.d/misc.sh open sqlite
808         View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view sqlite
809
810 # dbf
811 shell/i/.dbf
812         Open=/usr/lib/mc/ext.d/misc.sh open dbf
813         View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view dbf
814
815 # REXX script
816 regex/\.(rexx?|cmd)$
817        Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
818
819 # Disk images for Commodore computers (VIC20, C64, C128)
820 shell/i/.d64
821         Open=%cd %p/uc1541://
822         View=%view{ascii} c1541 %f -list
823         Extract=c1541 %f -extract
824
825 # Glade, a user interface designer for GTK+ and GNOME
826 shell/i/.glade
827         Open=/usr/lib/mc/ext.d/misc.sh open glade
828
829 # Gettext Catalogs
830 regex/\.g?mo$
831         View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view mo
832
833 # po
834 shell/.po
835         Open=/usr/lib/mc/ext.d/misc.sh open po
836
837 # lyx
838 shell/i/.lyx
839         Open=/usr/lib/mc/ext.d/misc.sh open lyx
840         View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view lyx
841
842 # torrent
843 shell/i/.torrent
844         View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view torrent
845
846 ### Plain compressed files ###
847
848 # ace
849 shell/i/.ace
850         Open=%cd %p/uace://
851         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view ace
852         Extract=unace x %f
853
854 # arc
855 shell/i/.arc
856         Open=%cd %p/uarc://
857         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view arc
858         Extract=arc x %f '*'
859         Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
860
861 # zip
862 shell/i/.zip
863         Open=%cd %p/uzip://
864         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zip
865
866 # zip
867 type/i/^zip\ archive
868         Open=%cd %p/uzip://
869         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zip
870
871 # jar(zip)
872 type/i/^Java\ (Jar\ file|archive)\ data\ \((zip|JAR)\)
873         Open=%cd %p/uzip://
874         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zip
875
876 # zoo
877 shell/i/.zoo
878         Open=%cd %p/uzoo://
879         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zoo
880
881 # gzip
882 type/^gzip
883         Open=/usr/lib/mc/ext.d/archive.sh view gz %var{PAGER:more}
884         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view gz
885
886 regex/\.(gz|Z)$
887         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view gz
888
889 # bzip2
890 type/^bzip2
891         Open=/usr/lib/mc/ext.d/archive.sh view bzip2 %var{PAGER:more}
892         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view bz2
893
894 regex/\.bz2?$
895         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view bz2
896
897 # bzip
898 type/^bzip
899         Open=/usr/lib/mc/ext.d/archive.sh view bzip %var{PAGER:more}
900         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view bzip
901
902 # compress
903 type/^compress
904         Open=/usr/lib/mc/ext.d/archive.sh view gz %var{PAGER:more}
905         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view gz
906
907 # lz
908 regex/\.lz$
909         Open=/usr/lib/mc/ext.d/archive.sh view lz %var{PAGER:more}
910         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view lz
911
912 # lz
913 type/^LZIP
914         Open=/usr/lib/mc/ext.d/archive.sh view lz %var{PAGER:more}
915         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view lz
916
917 # lz4
918 regex/\.lz4$
919         Open=/usr/lib/mc/ext.d/archive.sh view lz4 %var{PAGER:more}
920         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view lz4
921
922 # lzma
923 regex/\.lzma$
924         Open=/usr/lib/mc/ext.d/archive.sh view lzma %var{PAGER:more}
925         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view lzma
926
927 # xz
928 regex/\.xz$
929         Open=/usr/lib/mc/ext.d/archive.sh view xz %var{PAGER:more}
930         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view xz
931
932 # zstd
933 regex/\.zst$
934         Open=/usr/lib/mc/ext.d/archive.sh view zst %var{PAGER:more}
935         View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zst
936
937 # Parity Archive
938 type/^Parity\ Archive\ Volume\ Set
939         Open=/usr/lib/mc/ext.d/archive.sh open par2
940
941 ### Default ###
942
943 # Default target for anything not described above
944 default/*
945         Open=
946         View=
947
948
949 ### EOF ###