Remove content that duplicate /etc/mc/mc.ext. I preserve definition for video
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 06 Apr 2012 22:19:02 +0300
changeset 330 6197aede6474
parent 329 5c0a22da5ef3
child 331 7ae811635f6e
Remove content that duplicate /etc/mc/mc.ext. I preserve definition for video files because of https://www.midnight-commander.org/ticket/2773 and as system wide ms.ext file use 'mplayer' which I do not install.
.config/mc/mc.ext
--- a/.config/mc/mc.ext	Fri Apr 06 21:44:25 2012 +0300
+++ b/.config/mc/mc.ext	Fri Apr 06 22:19:02 2012 +0300
@@ -1,6 +1,4 @@
 # -*- mode: conf -*-
-# Midnight Commander 3.0 extension file
-# Warning: Structure of this file has changed completely with version 3.0
 #
 # All lines starting with # or empty lines are thrown away.
 # Lines starting in the first column should have following format:
@@ -91,10 +89,6 @@
 regex/\.(so|so\.[0-9\.]*)$
 	View=%view{ascii} file %f && nm -C -D %f
 
-# Exception: .3gp are video files not manual pages
-regex/\.(3[gG][pP])$
-	Include=video
-
 # Object
 type/^ELF
 	#Open=%var{PAGER:more} %f
@@ -112,234 +106,56 @@
 shell/.info
 	Open=info -f %f
 
-### Images ###
-
-type/^GIF
-	Include=image
-
-type/^JPEG
-	View=%view{ascii} identify %f; test -x /usr/bin/exif && echo && exif %f
-	Include=image
-
-type/^PC\ bitmap
-	Include=image
-
-type/^PNG
-	Include=image
-
-type/^TIFF
-	Include=image
-
-type/^PBM
-	Include=image
-
-type/^PGM
-	Include=image
-
-type/^PPM
-	Include=image
-
-type/^Netpbm
-	Include=image
-
-shell/.xcf
-	Open=(gimp %f &)
-
-shell/.xbm
-	Include=image 
-	#Open=bitmap %f
-
-shell/.xpm
-	Include=image
-	View=sxpm %f
-
-shell/.ico
-	Include=image
-
 include/image
 	Open=(see %f &)
 	View=%view{ascii} identify %f
 	#View=%view{ascii} asciiview %f
 
-
-### Sound files ###
-
-regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$
-	Open=run-mailcap audio/x-wav:%f &
-
-regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$
-	Open=run-mailcap application/x-mod:%f &
-
-regex/\.([mM][pP]3)$
-	Open=run-mailcap audio/mpeg:%f &
-	View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
-
-regex/\.([oO][gG][gG|aA|vV|xX])$
-	Open=run-mailcap application/x-ogg:%f &
-	View=%view{ascii} ogginfo %s
-
-regex/\.([sS][pP][xX]|[fF][lL][aA][cC])$
-	Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
-
-regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$
-	Open=run-mailcap audio/midi:%f
-
-regex/\.([wW][mM][aA])$
-	Open=mplayer -vo null %f
-	View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f
-
-
-### Play lists ###
-
-regex/\.([mM]3[uU]|[pP][lL][sS])$
-	Open=if [ -z "$DISPLAY" ]; then mplayer -vo null -playlist %f; else (xmms -p %f >/dev/null 2>&1 &); fi
-
-
-### Video ###
-
-regex/\.([aA][vV][iI])$
-	Include=video
-
-regex/\.([aA][sS][fFxX])$
-	Include=video
-
-regex/\.([dD][iI][vV][xX])$
-	Include=video
-
-regex/\.([mM][kK][vV])$
-	Include=video
-
-regex/\.([mM][oO][vV]|[qQ][tT])$
-	Include=video
-
-regex/\.([mM][pP]4|[mM][pP][eE]?[gG])$
-	Include=video
-
-# MPEG-2 TS container + H.264 codec
-regex/\.([mM][tT][sS])$
-	Include=video
-
-regex/\.([vV][oO][bB])$
-	Include=video
-
 # Old VLC under Debian have no association for wmv mimetype.
 regex/\.([wW][mM][vV])$
 	Open=vlc %f &
 
+regex/\.([aA][vV][iI])$
+	Include=video
+regex/\.(3[gG][pP])$
+	Include=video
+regex/\.([aA][sS][fFxX])$
+	Include=video
+regex/\.([dD][iI][vV][xX])$
+	Include=video
+regex/\.([mM][kK][vV])$
+	Include=video
+regex/\.([mM][oO][vV]|[qQ][tT])$
+	Include=video
+regex/\.([mM][pP]4|[mM][pP][eE]?[gG])$
+	Include=video
+# MPEG-2 TS container + H.264 codec
+regex/\.([mM][tT][sS])$
+	Include=video
+regex/\.([vV][oO][bB])$
+	Include=video
+regex/\.([wW][mM][vV])$
+	Include=video
 regex/\.([fF][lL][iIcCvV])$
 	Include=video
-
 regex/\.([oO][gG][mM])$
 	Include=video
 
-regex/\.([rR][aA]?[mM])$
-	Open=run-mailcap audio/x-pn-realaudio:%f &
-	#Open=(realplay %f >/dev/null 2>&1 &)
-
 include/video
 	Open=see %f
-	#Open=(mplayer %f >/dev/null 2>&1 &)
-	#Open=(gtv %f >/dev/null 2>&1 &)
-	#Open=(xanim %f >/dev/null 2>&1 &)
 
-
-### Documents ###
-
-# Postscript
-type/^PostScript
-	Open=run-mailcap application/postscript:%f &
-	#Open=(gv %f &)
-	View=%view{ascii} ps2ascii %f
-
-# PDF
-type/^PDF
-	Open=run-mailcap application/pdf:%f 2>/dev/null &
-	#Open=(xpdf %f &)
-	#Open=(acroread %f &)
-	#Open=(ghostview %f &)
-	View=%view{ascii} pdftotext %f -
-
-shell/.pdf.gz
-    Open=(zxpdf %f &)
-
-# CHM
 shell/.chm
 	Open=xchm %f &
-	#Open=(xpdf %f &)
-	#Open=(acroread %f &)
-	#Open=(ghostview %f &)
 
-# The following code very ugly and should not be taken as example.
-# It should be cleaned up when the new format of mc.ext is developed.
-
-# DJVU
 shell/.djvu
     Open=djview %f &
 
-# html
-regex/\.([hH][tT][mM][lL]?)$
-	Open=run-mailcap text/html:%f &
-	View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f
-
-# StarOffice 5.2
-shell/.sdw
-	Open=(libreoffice %f &)
-
-# StarOffice 6 and OpenOffice.org formats
-regex/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
-	Open=(libreoffice %f &)
-	View=%view{ascii} odt2txt %f
-
-# AbiWord
-shell/.abw
-	Open=(abiword %f &)
-
-# Microsoft Word Document
-regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
-	Open=run-mailcap application/msword:%f &
-	View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
-type/^Microsoft\ Word
-	Open=(abiword %f >/dev/null 2>&1 &)
-	View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
-
-# RTF document
-regex/\.([rR][tT][fF])$
-	Open=run-mailcap text/rtf:%f &
-	#Open=(abiword %f >/dev/null 2>&1 &)
-
-# Microsoft Excel Worksheet
-regex/\.([xX][lL][sSwW])$
-	Open=(gnumeric %f >/dev/null 2>&1 &)
-	View=%view{ascii} xls2csv %f || strings %f
-type/^Microsoft\ Excel
-	Open=(gnumeric %f >/dev/null 2>&1 &)
-	View=%view{ascii} xls2csv %f || strings %f
-
-# Use OpenOffice.org to open any MS Office documents
-type/^Microsoft\ Office\ Document
-	Open=(libreoffice %f &)
-
-# Framemaker
-type/^FrameMaker
-	Open=fmclient -f %f
-
-# DVI
-regex/\.([dD][vV][iI])$
-	Open=run-mailcap %f 2>&1 &
-	View=%view{ascii} catdvi %f
-
 shell/.fb2
     Open=fbreader %f &
 
 shell/.epub
     Open=fbreader %f &
 
-# DjVu
-regex/\.(djvu|DJVU)$
-	Open=djview %f &
-
-### Miscellaneous ###
-
 # Makefile
 regex/[Mm]akefile$
 	Open=make -f %f %{Enter parameters}
@@ -352,47 +168,6 @@
 regex/^Makefile.(PL|pl)$
 	Open=%var{PERL:perl} %f
 
-# dbf
-regex/\.([dD][bB][fF])$
-       Open=%view{ascii} dbview %f
-       View=%view{ascii} dbview -b %f
-
-# REXX script
-regex/\.(rexx?|cmd)$
-       Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
-
-# Disk images for Commodore computers (VIC20, C64, C128)
-regex/\.(d64|D64)$
-	Open=%cd %p/uc1541://
-	View=%view{ascii} c1541 %f -list
-	Extract=c1541 %f -extract
-
-# Glade, a user interface designer for GTK+ and GNOME
-regex/\.([Gg][Ll][Aa][Dd][Ee])$
-	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
-
-# Gettext Catalogs
-shell/.mo
-	View=%view{ascii} msgunfmt %f || cat %f
-
-# lyx
-regex/\.(lyx|LYX)$
-	Open=lyx %f
-	View=%view{ascii} lyxcat %f
-
-# torrent
-regex/\.([tT][oO][rR][rR][eE][nN][tT])$
-	View=%view{ascii} ctorrent -x %f 2>/dev/null
-
-### Debian additions ###
-
-# Gettext Catalogs
-shell/.mo
-	View=%view{ascii} msgunfmt %f || cat %f
-
-################################################################
-# My preference.
-
 shell/.my
     Open=tmp=%f; echo ${tmp%.my} %f %{Enter opt:} %{Enter file:}
 
@@ -421,11 +196,3 @@
 shell/.class
 	View=%view{ascii} tmp=%p; javap -c ${tmp%%.class}
 
-### Default ###
-
-# Default target for anything not described above
-default/*
-	Open=
-	View=
-
-### EOF ###