mc.ext.in 18 KB

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