mc.ext.in 16 KB

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