mc.ext.in 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  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. ### Archives ###
  102. # .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk
  103. regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$
  104. Open=%cd %p#utar
  105. View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
  106. regex/\.tar\.bz$
  107. # Open=%cd %p#utar
  108. View=%view{ascii} bzip -dc %f 2>/dev/null | tar tvvf -
  109. regex/\.t(ar\.bz2|bz2?|b2)$
  110. Open=%cd %p#utar
  111. View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf -
  112. # .tar.lzma, .tlz
  113. regex/\.t(ar\.lzma|lz)$
  114. Open=%cd %p#utar
  115. View=%view{ascii} lzma -dc %f 2>/dev/null | tar tvvf -
  116. # .tar.xz, .txz
  117. regex/\.t(ar\.xz|xz)$
  118. Open=%cd %p#utar
  119. View=%view{ascii} xz -dc %f 2>/dev/null | tar tvvf -
  120. # .tar.F - used in QNX
  121. regex/\.tar\.F$
  122. # Open=%cd %p#utar
  123. View=%view{ascii} freeze -dc %f 2>/dev/null | tar tvvf -
  124. # .qpr/.qpk - QNX Neutrino package installer files
  125. regex/\.(qp[rk])$
  126. Open=%cd %p#utar
  127. View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
  128. # tar
  129. regex/\.(tar|TAR)$
  130. Open=%cd %p#utar
  131. View=%view{ascii} tar tvvf - < %f
  132. # lha
  133. type/^LHa\ .*archive
  134. Open=%cd %p#ulha
  135. View=%view{ascii} lha l %f
  136. # arj
  137. regex/\.a(rj|[0-9][0-9])$
  138. Open=%cd %p#uarj
  139. View=%view{ascii} unarj l %f
  140. # cab
  141. regex/\.([cC][aA][bB])$
  142. Open=%cd %p#ucab
  143. View=%view{ascii} cabextract -l %f
  144. # ha
  145. regex/\.([Hh][Aa])$
  146. Open=%cd %p#uha
  147. View=%view{ascii} ha lf %f
  148. # rar
  149. regex/\.[rR]([aA][rR]|[0-9][0-9])$
  150. Open=%cd %p#urar
  151. View=%view{ascii} rar v -c- %f
  152. # ALZip
  153. regex/\.(alz|ALZ)$
  154. Open=%cd %p#ualz
  155. View=%view{ascii} unalz -l %f
  156. # cpio
  157. shell/.cpio.Z
  158. Open=%cd %p#ucpio
  159. View=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null
  160. shell/.cpio.gz
  161. Open=%cd %p#ucpio
  162. View=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null
  163. shell/.cpio
  164. Open=%cd %p#ucpio
  165. View=%view{ascii} cpio -itv < %f 2>/dev/null
  166. # ls-lR
  167. regex/(^|\.)ls-?lR(\.gz|Z|bz2)$
  168. Open=%cd %p#lslR
  169. # patch
  170. regex/\.(diff|patch)(\.bz2)$
  171. Open=%cd %p#patchfs
  172. View=%view{ascii} bzip2 -dc %f 2>/dev/null
  173. regex/\.(diff|patch)(\.(gz|Z))$
  174. Open=%cd %p#patchfs
  175. View=%view{ascii} gzip -dc %f 2>/dev/null
  176. regex/\.(diff|patch)$
  177. Open=%cd %p#patchfs
  178. View=%view{ascii} /bin/cat %f 2>/dev/null
  179. # ar library
  180. regex/\.s?a$
  181. Open=%cd %p#uar
  182. #Open=%view{ascii} ar tv %f
  183. View=%view{ascii} file %f && nm -C %f
  184. # trpm
  185. regex/\.trpm$
  186. Open=%cd %p#trpm
  187. View=%view{ascii} rpm -qivl --scripts `basename %p .trpm`
  188. # RPM packages (SuSE uses *.spm for source packages)
  189. regex/\.(src\.rpm|spm)$
  190. Open=%cd %p#rpm
  191. View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f
  192. regex/\.rpm$
  193. Open=%cd %p#rpm
  194. View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f
  195. # deb
  196. regex/\.u?deb$
  197. Open=%cd %p#deb
  198. View=%view{ascii} dpkg-deb -I %f && echo && dpkg-deb -c %f
  199. # dpkg
  200. shell/.debd
  201. Open=%cd %p#debd
  202. View=%view{ascii} dpkg -s `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
  203. # apt
  204. shell/.deba
  205. Open=%cd %p#deba
  206. View=%view{ascii} apt-cache show `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
  207. # ISO9660
  208. regex/\.([iI][sS][oO])$
  209. Open=%cd %p#iso9660
  210. View=%view{ascii} isoinfo -l -i %f
  211. # 7zip archives (they are not man pages)
  212. regex/\.(7z|7Z)$
  213. Open=%cd %p#u7z
  214. View=%view{ascii} 7za l %f 2>/dev/null
  215. # Mailboxes
  216. type/^ASCII\ mail\ text
  217. Open=%cd %p#mailfs
  218. ### Sources ###
  219. # C
  220. shell/.c
  221. Open=%var{EDITOR:vi} %f
  222. # Fortran
  223. shell/.f
  224. Open=%var{EDITOR:vi} %f
  225. # Header
  226. regex/\.(h|hpp)$
  227. Open=%var{EDITOR:vi} %f
  228. # Asm
  229. shell/.s
  230. Open=%var{EDITOR:vi} %f
  231. # C++
  232. regex/\.(C|cc|cpp)$
  233. Open=%var{EDITOR:vi} %f
  234. # .so libraries
  235. regex/\.(so|so\.[0-9\.]*)$
  236. View=%view{ascii} file %f && nm -C -D %f
  237. # Object
  238. type/^ELF
  239. #Open=%var{PAGER:more} %f
  240. View=%view{ascii} file %f && nm -C %f
  241. ### Documentation ###
  242. # Texinfo
  243. regex/\.(te?xi|texinfo)$
  244. # GNU Info page
  245. type/^Info\ text
  246. Open=info -f %f
  247. shell/.info
  248. Open=info -f %f
  249. # Exception: .3gp are video files not manual pages
  250. regex/\.(3[gG][pP])$
  251. Include=video
  252. # Manual page
  253. regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
  254. Open=case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  255. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  256. # Perl pod page
  257. shell/.pod
  258. Open=pod2man %f | nroff @MAN_FLAGS@ @MANDOC@ | %var{PAGER:more}
  259. View=%view{ascii,nroff} pod2man %f | nroff @MAN_FLAGS@ @MANDOC@
  260. # Troff with me macros.
  261. # Exception - "read.me" is not a nroff file.
  262. shell/read.me
  263. Open=
  264. View=
  265. shell/.me
  266. Open=nroff @MAN_FLAGS@ -me %f | %var{PAGER:more}
  267. View=%view{ascii,nroff} nroff @MAN_FLAGS@ -me %f
  268. # Troff with ms macros.
  269. shell/.ms
  270. Open=nroff @MAN_FLAGS@ -ms %f | %var{PAGER:more}
  271. View=%view{ascii,nroff} nroff @MAN_FLAGS@ -ms %f
  272. # Manual page - compressed
  273. regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
  274. Open=case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  275. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  276. regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
  277. Open=case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  278. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  279. regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
  280. Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  281. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  282. regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
  283. Open=case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  284. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  285. regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
  286. Open=case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  287. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  288. # CHM
  289. regex/\.(chm|CHM)$
  290. Open=which kchmviewer > /dev/null 2>&1 && (kchmviewer %f &) || (xchm %f &)
  291. ### Images ###
  292. type/^GIF
  293. Include=image
  294. type/^JPEG
  295. View=%view{ascii} identify %f; test -x /usr/bin/exif && echo && exif %f 2>/dev/null
  296. Include=image
  297. type/^PC\ bitmap
  298. Include=image
  299. type/^PNG
  300. Include=image
  301. type/^TIFF
  302. Include=image
  303. type/^PBM
  304. Include=image
  305. type/^PGM
  306. Include=image
  307. type/^PPM
  308. Include=image
  309. type/^Netpbm
  310. Include=image
  311. shell/.xcf
  312. Open=(gimp %f &)
  313. shell/.xbm
  314. Open=bitmap %f
  315. shell/.xpm
  316. Include=image
  317. View=sxpm %f
  318. shell/.ico
  319. Include=image
  320. include/image
  321. Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi
  322. View=%view{ascii} identify %f
  323. #View=%view{ascii} asciiview %f
  324. ### Sound files ###
  325. regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$
  326. Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
  327. regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$
  328. Open=mikmod %f
  329. #Open=tracker %f
  330. regex/\.([wW][aA][wW]22)$
  331. Open=vplay -s 22 %f
  332. regex/\.([mM][pP]3)$
  333. Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
  334. View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
  335. regex/\.([oO][gG][gG|aA|vV|xX])$
  336. Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
  337. View=%view{ascii} ogginfo %s
  338. regex/\.([sS][pP][xX]|[fF][lL][aA][cC])$
  339. Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
  340. regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$
  341. Open=timidity %f
  342. regex/\.([wW][mM][aA])$
  343. Open=mplayer -vo null %f
  344. View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f
  345. ### Play lists ###
  346. regex/\.([mM]3[uU]|[pP][lL][sS])$
  347. Open=if [ -z "$DISPLAY" ]; then mplayer -vo null -playlist %f; else (xmms -p %f >/dev/null 2>&1 &); fi
  348. ### Video ###
  349. regex/\.([aA][vV][iI])$
  350. Include=video
  351. regex/\.([aA][sS][fFxX])$
  352. Include=video
  353. regex/\.([dD][iI][vV][xX])$
  354. Include=video
  355. regex/\.([mM][kK][vV])$
  356. Include=video
  357. regex/\.([mM][oO][vV]|[qQ][tT])$
  358. Include=video
  359. regex/\.([mM][pP]4|[mM][pP][eE]?[gG])$
  360. Include=video
  361. # MPEG-2 TS container + H.264 codec
  362. regex/\.([mM][tT][sS])$
  363. Include=video
  364. regex/\.([vV][oO][bB])$
  365. Include=video
  366. regex/\.([wW][mM][vV])$
  367. Include=video
  368. regex/\.([fF][lL][iIcCvV])$
  369. Include=video
  370. regex/\.([oO][gG][mM])$
  371. Include=video
  372. regex/\.([rR][aA]?[mM])$
  373. Open=(realplay %f >/dev/null 2>&1 &)
  374. include/video
  375. Open=(mplayer %f >/dev/null 2>&1 &)
  376. #Open=(gtv %f >/dev/null 2>&1 &)
  377. #Open=(xanim %f >/dev/null 2>&1 &)
  378. ### Documents ###
  379. # Postscript
  380. type/^PostScript
  381. Open=(gv %f &)
  382. View=%view{ascii} ps2ascii %f
  383. # PDF
  384. type/^PDF
  385. Open=(xpdf %f &)
  386. #Open=(acroread %f &)
  387. #Open=(ghostview %f &)
  388. View=%view{ascii} pdftotext %f -
  389. # The following code very ugly and should not be taken as example.
  390. # It should be cleaned up when the new format of mc.ext is developed.
  391. # html
  392. regex/\.([hH][tT][mM][lL]?)$
  393. 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
  394. View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f
  395. # StarOffice 5.2
  396. shell/.sdw
  397. Open=(ooffice %f &)
  398. # StarOffice 6 and OpenOffice.org formats
  399. regex/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
  400. Open=(ooffice %f &)
  401. View=%view{ascii} odt2txt %f
  402. # AbiWord
  403. shell/.abw
  404. Open=(abiword %f &)
  405. # Microsoft Word Document
  406. regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
  407. Open=(abiword %f >/dev/null 2>&1 &)
  408. View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
  409. type/^Microsoft\ Word
  410. Open=(abiword %f >/dev/null 2>&1 &)
  411. View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
  412. # RTF document
  413. regex/\.([rR][tT][fF])$
  414. Open=(abiword %f >/dev/null 2>&1 &)
  415. # Microsoft Excel Worksheet
  416. regex/\.([xX][lL][sSwW])$
  417. Open=(gnumeric %f >/dev/null 2>&1 &)
  418. View=%view{ascii} xls2csv %f || strings %f
  419. type/^Microsoft\ Excel
  420. Open=(gnumeric %f >/dev/null 2>&1 &)
  421. View=%view{ascii} xls2csv %f || strings %f
  422. # Use OpenOffice.org to open any MS Office documents
  423. type/^Microsoft\ Office\ Document
  424. Open=(ooffice %f &)
  425. # Framemaker
  426. type/^FrameMaker
  427. Open=fmclient -f %f
  428. # DVI
  429. regex/\.([dD][vV][iI])$
  430. Open=if [ x$DISPLAY = x ]; then dvisvga %f; else (xdvi %f &); fi
  431. View=%view{ascii} dvi2tty %f
  432. # TeX
  433. regex/\.([Tt][Ee][Xx])$
  434. Open=%var{EDITOR:vi} %f
  435. # DjVu
  436. regex/\.(djvu|DJVU)$
  437. Open=djview %f &
  438. ### Miscellaneous ###
  439. # Makefile
  440. regex/[Mm]akefile$
  441. Open=make -f %f %{Enter parameters}
  442. # Imakefile
  443. shell/Imakefile
  444. Open=xmkmf -a
  445. # Makefile.PL (MakeMaker)
  446. regex/^Makefile.(PL|pl)$
  447. Open=%var{PERL:perl} %f
  448. # dbf
  449. regex/\.([dD][bB][fF])$
  450. Open=%view{ascii} dbview %f
  451. View=%view{ascii} dbview -b %f
  452. # REXX script
  453. regex/\.(rexx?|cmd)$
  454. Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
  455. # Disk images for Commodore computers (VIC20, C64, C128)
  456. regex/\.(d64|D64)$
  457. Open=%cd %p#uc1541
  458. View=%view{ascii} c1541 %f -list
  459. Extract=c1541 %f -extract
  460. # Glade, a user interface designer for GTK+ and GNOME
  461. regex/\.([Gg][Ll][Aa][Dd][Ee])$
  462. 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
  463. # Gettext Catalogs
  464. shell/.mo
  465. View=%view{ascii} msgunfmt %f || cat %f
  466. # lyx
  467. regex/\.(lyx|LYX)$
  468. Open=lyx %f
  469. View=%view{ascii} lyxcat %f
  470. # torrent
  471. regex/\.([tT][oO][rR][rR][eE][nN][tT])$
  472. View=%view{ascii} ctorrent -x %f 2>/dev/null
  473. ### Plain compressed files ###
  474. # ace
  475. regex/\.(ace|ACE)$
  476. Open=%cd %p#uace
  477. View=%view{ascii} unace l %f
  478. Extract=unace x %f
  479. # arc
  480. regex/\.(arc|ARC)$
  481. Open=%cd %p#uarc
  482. View=%view{ascii} arc l %f
  483. Extract=arc x %f '*'
  484. Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
  485. # zip
  486. type/^([Zz][Ii][Pp])\ archive
  487. Open=%cd %p#uzip
  488. View=%view{ascii} unzip -v %f
  489. # zoo
  490. regex/\.([Zz][Oo][Oo])$
  491. Open=%cd %p#uzoo
  492. View=%view{ascii} zoo l %f
  493. # gzip
  494. type/^gzip
  495. Open=gzip -dc %f | %var{PAGER:more}
  496. View=%view{ascii} gzip -dc %f 2>/dev/null
  497. regex/\.(gz|Z)$
  498. View=%view{ascii} gzip -dc %f 2>/dev/null
  499. # bzip2
  500. type/^bzip2
  501. Open=bzip2 -dc %f | %var{PAGER:more}
  502. View=%view{ascii} bzip2 -dc %f 2>/dev/null
  503. regex/\.bz2?$
  504. View=%view{ascii} bzip2 -dc %f 2>/dev/null
  505. # bzip
  506. type/^bzip
  507. Open=bzip -dc %f | %var{PAGER:more}
  508. View=%view{ascii} bzip -dc %f 2>/dev/null
  509. # compress
  510. type/^compress
  511. Open=gzip -dc %f | %var{PAGER:more}
  512. View=%view{ascii} gzip -dc %f 2>/dev/null
  513. # lzma
  514. regex/\.lzma$
  515. Open=lzma -dc %f | %var{PAGER:more}
  516. View=%view{ascii} lzma -dc %f 2>/dev/null
  517. # xz
  518. regex/\.xz$
  519. Open=xz -dc %f | %var{PAGER:more}
  520. View=%view{ascii} xz -dc %f 2>/dev/null
  521. ### Default ###
  522. # Default target for anything not described above
  523. default/*
  524. Open=
  525. View=
  526. ### EOF ###