mc.ext.in 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  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, mcfs 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 %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/\.iso$
  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. # Object
  229. type/^ELF
  230. #Open=%var{PAGER:more} %f
  231. View=%view{ascii} file %f && nm %f
  232. # Asm
  233. shell/.s
  234. Open=%var{EDITOR:vi} %f
  235. # C++
  236. regex/\.(C|cc|cpp)$
  237. Open=%var{EDITOR:vi} %f
  238. ### Documentation ###
  239. # Texinfo
  240. regex/\.(te?xi|texinfo)$
  241. # GNU Info page
  242. type/^Info\ text
  243. Open=info -f %f
  244. shell/.info
  245. Open=info -f %f
  246. # Manual page
  247. # Exception - .so libraries are not manual pages
  248. regex/\.(so|so\.[0-9\.]*)$
  249. View=%view{ascii} file %f && nm %f
  250. regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
  251. Open=case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  252. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  253. # Perl pod page
  254. shell/.pod
  255. Open=pod2man %f | nroff @MAN_FLAGS@ @MANDOC@ | %var{PAGER:more}
  256. View=%view{ascii,nroff} pod2man %f | nroff @MAN_FLAGS@ @MANDOC@
  257. # Troff with me macros.
  258. # Exception - "read.me" is not a nroff file.
  259. shell/read.me
  260. Open=
  261. View=
  262. shell/.me
  263. Open=nroff @MAN_FLAGS@ -me %f | %var{PAGER:more}
  264. View=%view{ascii,nroff} nroff @MAN_FLAGS@ -me %f
  265. # Troff with ms macros.
  266. shell/.ms
  267. Open=nroff @MAN_FLAGS@ -ms %f | %var{PAGER:more}
  268. View=%view{ascii,nroff} nroff @MAN_FLAGS@ -ms %f
  269. # Manual page - compressed
  270. regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
  271. Open=case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  272. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  273. regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
  274. Open=case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  275. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  276. regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
  277. Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  278. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  279. regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
  280. Open=case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  281. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  282. regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
  283. Open=case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
  284. View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
  285. # CHM
  286. regex/\.(chm|CHM)$
  287. Open=which kchmviewer > /dev/null 2>&1 && (kchmviewer %f &) || (xchm %f &)
  288. ### Images ###
  289. type/^GIF
  290. Include=image
  291. type/^JPEG
  292. View=%view{ascii} identify %f; test -x /usr/bin/exif && echo && exif %f 2>/dev/null
  293. Include=image
  294. type/^PC\ bitmap
  295. Include=image
  296. type/^PNG
  297. Include=image
  298. type/^TIFF
  299. Include=image
  300. type/^PBM
  301. Include=image
  302. type/^PGM
  303. Include=image
  304. type/^PPM
  305. Include=image
  306. type/^Netpbm
  307. Include=image
  308. shell/.xcf
  309. Open=(gimp %f &)
  310. shell/.xbm
  311. Open=bitmap %f
  312. shell/.xpm
  313. Include=image
  314. View=sxpm %f
  315. shell/.ico
  316. Include=image
  317. include/image
  318. Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi
  319. View=%view{ascii} identify %f
  320. #View=%view{ascii} asciiview %f
  321. ### Sound files ###
  322. regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$
  323. Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
  324. regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$
  325. Open=mikmod %f
  326. #Open=tracker %f
  327. regex/\.([wW][aA][wW]22)$
  328. Open=vplay -s 22 %f
  329. regex/\.([mM][pP]3)$
  330. Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
  331. View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
  332. regex/\.([oO][gG][gG|aA|vV|xX])$
  333. Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
  334. View=%view{ascii} ogginfo %s
  335. regex/\.([sS][pP][xX]|[fF][lL][aA][cC])$
  336. Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
  337. regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$
  338. Open=timidity %f
  339. regex/\.([wW][mM][aA])$
  340. Open=mplayer -vo null %f
  341. View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f
  342. ### Play lists ###
  343. regex/\.([mM]3[uU]|[pP][lL][sS])$
  344. Open=if [ -z "$DISPLAY" ]; then mplayer -vo null -playlist %f; else (xmms -p %f >/dev/null 2>&1 &); fi
  345. ### Video ###
  346. regex/\.([aA][vV][iI])$
  347. Include=video
  348. regex/\.([aA][sS][fFxX])$
  349. Include=video
  350. regex/\.([dD][iI][vV][xX])$
  351. Include=video
  352. regex/\.([mM][kK][vV])$
  353. Include=video
  354. regex/\.([mM][oO][vV]|[qQ][tT])$
  355. Include=video
  356. regex/\.([mM][pP]4|[mM][pP][eE]?[gG])$
  357. Include=video
  358. regex/\.([vV][oO][bB])$
  359. Include=video
  360. regex/\.([wW][mM][vV])$
  361. Include=video
  362. regex/\.([fF][lL][iIcCvV])$
  363. Include=video
  364. regex/\.([oO][gG][mM])$
  365. Include=video
  366. regex/\.([rR][aA]?[mM])$
  367. Open=(realplay %f >/dev/null 2>&1 &)
  368. include/video
  369. Open=(mplayer %f >/dev/null 2>&1 &)
  370. #Open=(gtv %f >/dev/null 2>&1 &)
  371. #Open=(xanim %f >/dev/null 2>&1 &)
  372. ### Documents ###
  373. # Postscript
  374. type/^PostScript
  375. Open=(gv %f &)
  376. View=%view{ascii} ps2ascii %f
  377. # PDF
  378. type/^PDF
  379. Open=(xpdf %f &)
  380. #Open=(acroread %f &)
  381. #Open=(ghostview %f &)
  382. View=%view{ascii} pdftotext %f -
  383. # The following code very ugly and should not be taken as example.
  384. # It should be cleaned up when the new format of mc.ext is developed.
  385. # html
  386. regex/\.([hH][tT][mM][lL]?)$
  387. 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
  388. View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f
  389. # StarOffice 5.2
  390. shell/.sdw
  391. Open=(ooffice %f &)
  392. # StarOffice 6 and OpenOffice.org formats
  393. regex/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
  394. Open=(ooffice %f &)
  395. View=%view{ascii} odt2txt %f
  396. # AbiWord
  397. shell/.abw
  398. Open=(abiword %f &)
  399. # Microsoft Word Document
  400. regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
  401. Open=(abiword %f >/dev/null 2>&1 &)
  402. View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
  403. type/^Microsoft\ Word
  404. Open=(abiword %f >/dev/null 2>&1 &)
  405. View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
  406. # RTF document
  407. regex/\.([rR][tT][fF])$
  408. Open=(abiword %f >/dev/null 2>&1 &)
  409. # Microsoft Excel Worksheet
  410. regex/\.([xX][lL][sSwW])$
  411. Open=(gnumeric %f >/dev/null 2>&1 &)
  412. View=%view{ascii} xls2csv %f || strings %f
  413. type/^Microsoft\ Excel
  414. Open=(gnumeric %f >/dev/null 2>&1 &)
  415. View=%view{ascii} xls2csv %f || strings %f
  416. # Use OpenOffice.org to open any MS Office documents
  417. type/^Microsoft\ Office\ Document
  418. Open=(ooffice %f &)
  419. # Framemaker
  420. type/^FrameMaker
  421. Open=fmclient -f %f
  422. # DVI
  423. regex/\.([dD][vV][iI])$
  424. Open=if [ x$DISPLAY = x ]; then dvisvga %f; else (xdvi %f &); fi
  425. View=%view{ascii} dvi2tty %f
  426. # TeX
  427. regex/\.([Tt][Ee][Xx])$
  428. Open=%var{EDITOR:vi} %f
  429. # DjVu
  430. regex/\.(djvu|DJVU)$
  431. Open=djview %f &
  432. ### Miscellaneous ###
  433. # Makefile
  434. regex/[Mm]akefile$
  435. Open=make -f %f %{Enter parameters}
  436. # Imakefile
  437. shell/Imakefile
  438. Open=xmkmf -a
  439. # Makefile.PL (MakeMaker)
  440. regex/^Makefile.(PL|pl)$
  441. Open=%var{PERL:perl} %f
  442. # dbf
  443. regex/\.([dD][bB][fF])$
  444. Open=%view{ascii} dbview %f
  445. View=%view{ascii} dbview -b %f
  446. # REXX script
  447. regex/\.(rexx?|cmd)$
  448. Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
  449. # Disk images for Commodore computers (VIC20, C64, C128)
  450. regex/\.(d64|D64)$
  451. Open=%cd %p#uc1541
  452. View=%view{ascii} c1541 %f -list
  453. Extract=c1541 %f -extract
  454. # Glade, a user interface designer for GTK+ and GNOME
  455. regex/\.([Gg][Ll][Aa][Dd][Ee])$
  456. 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
  457. # Gettext Catalogs
  458. shell/.mo
  459. View=%view{ascii} msgunfmt %f || cat %f
  460. # lyx
  461. regex/\.(lyx|LYX)$
  462. Open=lyx %f
  463. View=%view{ascii} lyxcat %f
  464. ### Plain compressed files ###
  465. # ace
  466. regex/\.(ace|ACE)$
  467. Open=%cd %p#uace
  468. View=%view{ascii} unace l %f
  469. Extract=unace x %f
  470. # arc
  471. regex/\.(arc|ARC)$
  472. Open=%cd %p#uarc
  473. View=%view{ascii} arc l %f
  474. Extract=arc x %f '*'
  475. Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
  476. # zip
  477. type/^([Zz][Ii][Pp])\ archive
  478. Open=%cd %p#uzip
  479. View=%view{ascii} unzip -v %f
  480. # zoo
  481. regex/\.([Zz][Oo][Oo])$
  482. Open=%cd %p#uzoo
  483. View=%view{ascii} zoo l %f
  484. # gzip
  485. type/^gzip
  486. Open=gzip -dc %f | %var{PAGER:more}
  487. View=%view{ascii} gzip -dc %f 2>/dev/null
  488. regex/\.(gz|Z)$
  489. View=%view{ascii} gzip -dc %f 2>/dev/null
  490. # bzip2
  491. type/^bzip2
  492. Open=bzip2 -dc %f | %var{PAGER:more}
  493. View=%view{ascii} bzip2 -dc %f 2>/dev/null
  494. regex/\.bz2?$
  495. View=%view{ascii} bzip2 -dc %f 2>/dev/null
  496. # bzip
  497. type/^bzip
  498. Open=bzip -dc %f | %var{PAGER:more}
  499. View=%view{ascii} bzip -dc %f 2>/dev/null
  500. # compress
  501. type/^compress
  502. Open=gzip -dc %f | %var{PAGER:more}
  503. View=%view{ascii} gzip -dc %f 2>/dev/null
  504. # lzma
  505. regex/\.lzma$
  506. Open=lzma -dc %f | %var{PAGER:more}
  507. View=%view{ascii} lzma -dc %f 2>/dev/null
  508. # xz
  509. regex/\.xz$
  510. Open=xz -dc %f | %var{PAGER:more}
  511. View=%view{ascii} xz -dc %f 2>/dev/null
  512. ### Default ###
  513. # Default target for anything not described above
  514. default/*
  515. Open=
  516. View=
  517. ### EOF ###