mc.ext.in 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. # Midnight Commander 3.0 extension file
  2. # Warning: Structure of this file has changed completely with version 3.0
  3. #
  4. # All lines starting with # or empty lines are thrown away.
  5. # Lines starting in the first column should have following format:
  6. #
  7. # keyword/descNL, i.e. everything after keyword/ until new line is desc
  8. #
  9. # keyword can be:
  10. #
  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)
  14. #
  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 ( ).
  19. #
  20. # type (file matches this if `file %f` matches regular expression desc
  21. # (the filename: part from `file %f` is removed))
  22. #
  23. # directory (matches any directory matching regular expression desc)
  24. #
  25. # include (matches an include directive)
  26. #
  27. # default (matches any file no matter what desc is)
  28. #
  29. # Other lines should start with a space or tab and should be in the format:
  30. #
  31. # keyword=commandNL (with no spaces around =), where keyword should be:
  32. #
  33. # Open (if the user presses Enter or doubleclicks it),
  34. #
  35. # View (F3), Edit (F4)
  36. #
  37. # Include is the keyword used to add any further entries from an include/
  38. # section
  39. #
  40. # command is any one-line shell command, with the following substitutions:
  41. #
  42. # %% -> % character
  43. # %p -> name of the current file (without path, but pwd is its path)
  44. # %f -> name of the current file. Unlike %p, if file is located on a
  45. # non-local virtual filesystem, i.e. either tarfs or ftpfs,
  46. # then the file will be temporarily copied into a local directory
  47. # and %f will be the full path to this local temporal file.
  48. # If you don't want to get a local copy and want to get the
  49. # virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then
  50. # use %d/%p instead of %f.
  51. # %d -> name of the current directory (pwd, without trailing slash)
  52. # %s -> "selected files", i.e. space separated list of tagged files if any
  53. # or name of the current file
  54. # %t -> list of tagged files
  55. # %u -> list of tagged files (they'll be untaged after the command)
  56. #
  57. # (If these 6 letters are in uppercase, they refer to the other panel.
  58. # But you shouldn't have to use it in this file.)
  59. #
  60. #
  61. # %cd -> the rest is a path mc should change into (cd won't work, since it's
  62. # a child process). %cd handles even vfs names.
  63. #
  64. # %view -> the command you type will be piped into mc's internal file viewer
  65. # if you type only the %view and no command, viewer will load %f file
  66. # instead (i.e. no piping, so it is different to %view cat %f)
  67. # %view may be directly followed by {} with a list of any of
  68. # ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for
  69. # text using backspace for bold and underscore) and unform
  70. # (no highlighting for nroff sequences) separated by commas.
  71. #
  72. # %var -> You use it like this: %var{VAR:default}. This macro will expand
  73. # to the value of the VAR variable in the environment if it's set
  74. # otherwise the value in default will be used. This is similar to
  75. # the Bourne shell ${VAR-default} construct.
  76. #
  77. # Rules are applied from top to bottom, thus the order is important.
  78. # If some actions are missing, search continues as if this target didn't
  79. # match (i.e. if a file matches the first and second entry and View action
  80. # is missing in the first one, then on pressing F3 the View action from
  81. # the second entry will be used. default should catch all the actions.
  82. #
  83. # Any new entries you develop for you are always welcome if they are
  84. # useful on more than one system. You can post your modifications
  85. # as tickets at www.midnight-commander.org
  86. ### Changes ###
  87. #
  88. # Reorganization: 2000-05-01 Michal Svec <rebel@penguin.cz>
  89. ### TODO ###
  90. #
  91. # Postscript Open: ps2svga [gs -DEVICE=jpeg|zgv or something]
  92. # Images asciiview
  93. #
  94. # All X Apps [Nothing/Warning] if no DISPLAY
  95. # Not found [Default/Warning]
  96. # Empty Output [Default/Warning]
  97. # Edit: CopyOut+EDIT+CopyIn
  98. # Security Check gzip/bzip EDIT (mktemp)
  99. #
  100. # Maybe: Open/XOpen/GOpen/KOpen/... for Console/X/GNOME/KDE/etc.
  101. ### GIT Repo ###
  102. # gitfs changeset
  103. regex/^\[git\]
  104. Open=%cd %p/changesetfs://
  105. View=%cd %p/patchsetfs://
  106. ### Archives ###
  107. # .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk
  108. regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$
  109. Open=%cd %p/utar://
  110. View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
  111. regex/\.tar\.bz$
  112. # Open=%cd %p/utar://
  113. View=%view{ascii} bzip -dc %f 2>/dev/null | tar tvvf -
  114. regex/\.t(ar\.bz2|bz2?|b2)$
  115. Open=%cd %p/utar://
  116. View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf -
  117. # .tar.lzma, .tlz
  118. regex/\.t(ar\.lzma|lz)$
  119. Open=%cd %p/utar://
  120. View=%view{ascii} lzma -dc %f 2>/dev/null | tar tvvf -
  121. # .tar.xz, .txz
  122. regex/\.t(ar\.xz|xz)$
  123. Open=%cd %p/utar://
  124. View=%view{ascii} xz -dc %f 2>/dev/null | tar tvvf -
  125. # .tar.F - used in QNX
  126. regex/\.tar\.F$
  127. # Open=%cd %p/utar://
  128. View=%view{ascii} freeze -dc %f 2>/dev/null | tar tvvf -
  129. # .qpr/.qpk - QNX Neutrino package installer files
  130. regex/\.(qp[rk])$
  131. Open=%cd %p/utar://
  132. View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
  133. # tar
  134. regex/\.(tar|TAR)$
  135. Open=%cd %p/utar://
  136. View=%view{ascii} tar tvvf - < %f
  137. # lha
  138. type/^LHa\ .*archive
  139. Open=%cd %p/ulha://
  140. View=%view{ascii} lha l %f
  141. # arj
  142. regex/\.a(rj|[0-9][0-9])$
  143. Open=%cd %p/uarj://
  144. View=%view{ascii} unarj l %f
  145. # cab
  146. regex/\.([cC][aA][bB])$
  147. Open=%cd %p/ucab://
  148. View=%view{ascii} cabextract -l %f
  149. # ha
  150. regex/\.([Hh][Aa])$
  151. Open=%cd %p/uha://
  152. View=%view{ascii} ha lf %f
  153. # rar
  154. regex/\.[rR]([aA][rR]|[0-9][0-9])$
  155. Open=%cd %p/urar://
  156. View=%view{ascii} rar v -c- %f
  157. # ALZip
  158. regex/\.(alz|ALZ)$
  159. Open=%cd %p/ualz://
  160. View=%view{ascii} unalz -l %f
  161. # cpio
  162. shell/.cpio.Z
  163. Open=%cd %p/ucpio://
  164. View=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null
  165. shell/.cpio.gz
  166. Open=%cd %p/ucpio://
  167. View=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null
  168. shell/.cpio
  169. Open=%cd %p/ucpio://
  170. View=%view{ascii} cpio -itv < %f 2>/dev/null
  171. # ls-lR
  172. regex/(^|\.)ls-?lR(\.gz|Z|bz2)$
  173. Open=%cd %p/lslR://
  174. # patch
  175. regex/\.(diff|patch)(\.bz2)$
  176. Open=%cd %p/patchfs://
  177. View=%view{ascii} bzip2 -dc %f 2>/dev/null
  178. regex/\.(diff|patch)(\.(gz|Z))$
  179. Open=%cd %p/patchfs://
  180. View=%view{ascii} gzip -dc %f 2>/dev/null
  181. regex/\.(diff|patch)$
  182. Open=%cd %p/patchfs://
  183. View=%view{ascii} /bin/cat %f 2>/dev/null
  184. # ar library
  185. regex/\.s?a$
  186. Open=%cd %p/uar://
  187. #Open=%view{ascii} ar tv %f
  188. View=%view{ascii} file %f && nm -C %f
  189. # trpm
  190. regex/\.trpm$
  191. Open=%cd %p/trpm://
  192. View=%view{ascii} rpm -qivl --scripts `basename %p .trpm`
  193. # RPM packages (SuSE uses *.spm for source packages)
  194. regex/\.(src\.rpm|spm)$
  195. Open=%cd %p/rpm://
  196. View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f
  197. regex/\.rpm$
  198. Open=%cd %p/rpm://
  199. View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f
  200. # deb
  201. regex/\.u?deb$
  202. Open=%cd %p/deb://
  203. View=%view{ascii} dpkg-deb -I %f && echo && dpkg-deb -c %f
  204. # dpkg
  205. shell/.debd
  206. Open=%cd %p/debd://
  207. View=%view{ascii} dpkg -s `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
  208. # apt
  209. shell/.deba
  210. Open=%cd %p/deba://
  211. View=%view{ascii} apt-cache show `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
  212. # ISO9660
  213. regex/\.([iI][sS][oO])$
  214. Open=%cd %p/iso9660://
  215. View=%view{ascii} isoinfo -l -i %f
  216. # 7zip archives (they are not man pages)
  217. regex/\.(7z|7Z)$
  218. Open=%cd %p/u7z://
  219. View=%view{ascii} 7za l %f 2>/dev/null
  220. # Mailboxes
  221. type/^ASCII\ mail\ text
  222. Open=%cd %p/mailfs://
  223. ### Sources ###
  224. # C
  225. shell/.c
  226. Include=editor
  227. # Fortran
  228. shell/.f
  229. Include=editor
  230. # Header
  231. regex/\.(h|hpp)$
  232. Include=editor
  233. # Asm
  234. shell/.s
  235. Include=editor
  236. # C++
  237. regex/\.(C|cc|cpp)$
  238. Include=editor
  239. include/editor
  240. Open=%var{EDITOR:vi} %f
  241. # .so libraries
  242. regex/\.(so|so\.[0-9\.]*)$
  243. View=%view{ascii} file %f && nm -C -D %f
  244. # Object
  245. type/^ELF
  246. #Open=%var{PAGER:more} %f
  247. View=%view{ascii} file %f && nm -C %f
  248. ### Documentation ###
  249. # Texinfo
  250. regex/\.(te?xi|texinfo)$
  251. # GNU Info page
  252. type/^Info\ text
  253. Open=info -f %f
  254. shell/.info
  255. Open=info -f %f
  256. # Exception: .3gp are video files not manual pages
  257. regex/\.(3[gG][pP])$
  258. Include=video
  259. # Manual page
  260. regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
  261. Open=case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  262. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  263. # Perl pod page
  264. shell/.pod
  265. Open=pod2man %f | nroff @MAN_FLAGS@ @MANDOC@ | %var{PAGER:more}
  266. View=%view{ascii,nroff} pod2man %f | nroff @MAN_FLAGS@ @MANDOC@
  267. # Troff with me macros.
  268. # Exception - "read.me" is not a nroff file.
  269. shell/read.me
  270. Open=
  271. View=
  272. shell/.me
  273. Open=nroff @MAN_FLAGS@ -me %f | %var{PAGER:more}
  274. View=%view{ascii,nroff} nroff @MAN_FLAGS@ -me %f
  275. # Troff with ms macros.
  276. shell/.ms
  277. Open=nroff @MAN_FLAGS@ -ms %f | %var{PAGER:more}
  278. View=%view{ascii,nroff} nroff @MAN_FLAGS@ -ms %f
  279. # Manual page - compressed
  280. regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
  281. Open=case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  282. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  283. regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
  284. Open=case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  285. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  286. regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
  287. Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  288. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  289. regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
  290. Open=case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  291. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  292. regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
  293. Open=case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  294. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  295. # CHM
  296. regex/\.(chm|CHM)$
  297. Open=which kchmviewer > /dev/null 2>&1 && (kchmviewer %f &) || (xchm %f &)
  298. ### Images ###
  299. type/^GIF
  300. Include=image
  301. type/^JPEG
  302. View=%view{ascii} identify %f; test -x /usr/bin/exif && echo && exif %f 2>/dev/null
  303. Include=image
  304. type/^PC\ bitmap
  305. Include=image
  306. type/^PNG
  307. Include=image
  308. type/^TIFF
  309. Include=image
  310. type/^PBM
  311. Include=image
  312. type/^PGM
  313. Include=image
  314. type/^PPM
  315. Include=image
  316. type/^Netpbm
  317. Include=image
  318. shell/.xcf
  319. Open=(gimp %f &)
  320. shell/.xbm
  321. Open=bitmap %f
  322. shell/.xpm
  323. Include=image
  324. View=sxpm %f
  325. shell/.ico
  326. Include=image
  327. include/image
  328. Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi
  329. View=%view{ascii} identify %f
  330. #View=%view{ascii} asciiview %f
  331. ### Sound files ###
  332. regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$
  333. Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
  334. regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$
  335. Open=mikmod %f
  336. #Open=tracker %f
  337. regex/\.([wW][aA][wW]22)$
  338. Open=vplay -s 22 %f
  339. regex/\.([mM][pP]3)$
  340. Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
  341. View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
  342. regex/\.([oO][gG][gG|aA|vV|xX])$
  343. Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
  344. View=%view{ascii} ogginfo %s
  345. regex/\.([sS][pP][xX]|[fF][lL][aA][cC])$
  346. Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
  347. regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$
  348. Open=timidity %f
  349. regex/\.([wW][mM][aA])$
  350. Open=mplayer -vo null %f
  351. View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f
  352. ### Play lists ###
  353. regex/\.([mM]3[uU]|[pP][lL][sS])$
  354. Open=if [ -z "$DISPLAY" ]; then mplayer -vo null -playlist %f; else (xmms -p %f >/dev/null 2>&1 &); fi
  355. ### Video ###
  356. regex/\.([aA][vV][iI])$
  357. Include=video
  358. regex/\.([aA][sS][fFxX])$
  359. Include=video
  360. regex/\.([dD][iI][vV][xX])$
  361. Include=video
  362. regex/\.([mM][kK][vV])$
  363. Include=video
  364. regex/\.([mM][oO][vV]|[qQ][tT])$
  365. Include=video
  366. regex/\.([mM][pP]4|[mM][pP][eE]?[gG])$
  367. Include=video
  368. # MPEG-2 TS container + H.264 codec
  369. regex/\.([mM][tT][sS])$
  370. Include=video
  371. regex/\.([vV][oO][bB])$
  372. Include=video
  373. regex/\.([wW][mM][vV])$
  374. Include=video
  375. regex/\.([fF][lL][iIcCvV])$
  376. Include=video
  377. regex/\.([oO][gG][mM])$
  378. Include=video
  379. regex/\.([rR][aA]?[mM])$
  380. Open=(realplay %f >/dev/null 2>&1 &)
  381. include/video
  382. Open=(mplayer %f >/dev/null 2>&1 &)
  383. #Open=(gtv %f >/dev/null 2>&1 &)
  384. #Open=(xanim %f >/dev/null 2>&1 &)
  385. ### Documents ###
  386. # Postscript
  387. type/^PostScript
  388. Open=(gv %f &)
  389. View=%view{ascii} ps2ascii %f
  390. # PDF
  391. type/^PDF
  392. Open=(xpdf %f &)
  393. #Open=(acroread %f &)
  394. #Open=(ghostview %f &)
  395. View=%view{ascii} pdftotext %f -
  396. # The following code very ugly and should not be taken as example.
  397. # It should be cleaned up when the new format of mc.ext is developed.
  398. # html
  399. regex/\.([hH][tT][mM][lL]?)$
  400. Open=(if test -n "@X11_WWW@" && test -n "$DISPLAY"; then (@X11_WWW@ file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null
  401. View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f
  402. # StarOffice 5.2
  403. shell/.sdw
  404. Open=(ooffice %f &)
  405. # StarOffice 6 and OpenOffice.org formats
  406. regex/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
  407. Open=(ooffice %f &)
  408. View=%view{ascii} odt2txt %f
  409. # AbiWord
  410. shell/.abw
  411. Open=(abiword %f &)
  412. # Microsoft Word Document
  413. regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
  414. Open=(abiword %f >/dev/null 2>&1 &)
  415. View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
  416. type/^Microsoft\ Word
  417. Open=(abiword %f >/dev/null 2>&1 &)
  418. View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
  419. # RTF document
  420. regex/\.([rR][tT][fF])$
  421. Open=(abiword %f >/dev/null 2>&1 &)
  422. # Microsoft Excel Worksheet
  423. regex/\.([xX][lL][sSwW])$
  424. Open=(gnumeric %f >/dev/null 2>&1 &)
  425. View=%view{ascii} xls2csv %f || strings %f
  426. type/^Microsoft\ Excel
  427. Open=(gnumeric %f >/dev/null 2>&1 &)
  428. View=%view{ascii} xls2csv %f || strings %f
  429. # Use OpenOffice.org to open any MS Office documents
  430. type/^Microsoft\ Office\ Document
  431. Open=(ooffice %f &)
  432. # Framemaker
  433. type/^FrameMaker
  434. Open=fmclient -f %f
  435. # DVI
  436. regex/\.([dD][vV][iI])$
  437. Open=if [ x$DISPLAY = x ]; then dvisvga %f; else (xdvi %f &); fi
  438. View=%view{ascii} dvi2tty %f
  439. # TeX
  440. regex/\.([Tt][Ee][Xx])$
  441. Include=editor
  442. # DjVu
  443. regex/\.(djvu|DJVU)$
  444. Open=djview %f &
  445. ### Miscellaneous ###
  446. # Makefile
  447. regex/[Mm]akefile$
  448. Open=make -f %f %{Enter parameters}
  449. # Imakefile
  450. shell/Imakefile
  451. Open=xmkmf -a
  452. # Makefile.PL (MakeMaker)
  453. regex/^Makefile.(PL|pl)$
  454. Open=%var{PERL:perl} %f
  455. # dbf
  456. regex/\.([dD][bB][fF])$
  457. Open=%view{ascii} dbview %f
  458. View=%view{ascii} dbview -b %f
  459. # REXX script
  460. regex/\.(rexx?|cmd)$
  461. Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
  462. # Disk images for Commodore computers (VIC20, C64, C128)
  463. regex/\.(d64|D64)$
  464. Open=%cd %p/uc1541://
  465. View=%view{ascii} c1541 %f -list
  466. Extract=c1541 %f -extract
  467. # Glade, a user interface designer for GTK+ and GNOME
  468. regex/\.([Gg][Ll][Aa][Dd][Ee])$
  469. Open=if glade-3 --version >/dev/null 2>&1; then (glade-3 %f >/dev/null 2>&1 &); else (glade-2 %f >/dev/null 2>&1 &); fi
  470. # Gettext Catalogs
  471. shell/.mo
  472. View=%view{ascii} msgunfmt %f || cat %f
  473. # lyx
  474. regex/\.(lyx|LYX)$
  475. Open=lyx %f
  476. View=%view{ascii} lyxcat %f
  477. # torrent
  478. regex/\.([tT][oO][rR][rR][eE][nN][tT])$
  479. View=%view{ascii} ctorrent -x %f 2>/dev/null
  480. ### Plain compressed files ###
  481. # ace
  482. regex/\.(ace|ACE)$
  483. Open=%cd %p/uace://
  484. View=%view{ascii} unace l %f
  485. Extract=unace x %f
  486. # arc
  487. regex/\.(arc|ARC)$
  488. Open=%cd %p/uarc://
  489. View=%view{ascii} arc l %f
  490. Extract=arc x %f '*'
  491. Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
  492. # zip
  493. type/^([Zz][Ii][Pp])\ archive
  494. Open=%cd %p/uzip://
  495. View=%view{ascii} unzip -v %f
  496. # zoo
  497. regex/\.([Zz][Oo][Oo])$
  498. Open=%cd %p/uzoo://
  499. View=%view{ascii} zoo l %f
  500. # gzip
  501. type/^gzip
  502. Open=gzip -dc %f | %var{PAGER:more}
  503. View=%view{ascii} gzip -dc %f 2>/dev/null
  504. regex/\.(gz|Z)$
  505. View=%view{ascii} gzip -dc %f 2>/dev/null
  506. # bzip2
  507. type/^bzip2
  508. Open=bzip2 -dc %f | %var{PAGER:more}
  509. View=%view{ascii} bzip2 -dc %f 2>/dev/null
  510. regex/\.bz2?$
  511. View=%view{ascii} bzip2 -dc %f 2>/dev/null
  512. # bzip
  513. type/^bzip
  514. Open=bzip -dc %f | %var{PAGER:more}
  515. View=%view{ascii} bzip -dc %f 2>/dev/null
  516. # compress
  517. type/^compress
  518. Open=gzip -dc %f | %var{PAGER:more}
  519. View=%view{ascii} gzip -dc %f 2>/dev/null
  520. # lzma
  521. regex/\.lzma$
  522. Open=lzma -dc %f | %var{PAGER:more}
  523. View=%view{ascii} lzma -dc %f 2>/dev/null
  524. # xz
  525. regex/\.xz$
  526. Open=xz -dc %f | %var{PAGER:more}
  527. View=%view{ascii} xz -dc %f 2>/dev/null
  528. ### Default ###
  529. # Default target for anything not described above
  530. default/*
  531. Open=
  532. View=
  533. ### EOF ###