All pastes #1404677 Raw Edit

/.mc/bindings

public text v1 · immutable
#1404677 ·published 2009-04-27 08:59 UTC
rendered paste body
# 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:## keyword/descNL, i.e. everything after keyword/ until new line is desc## keyword can be: ##    shell (desc is, when starting with a dot, any extension (no wildcars), #          i.e. matches all the files *desc . Example: .tar matches *.tar;#          if it doesn't start with a dot, it matches only a file of that name)##    regex (desc is an extended regular expression)#          Please note that we are using the GNU regex library and thus#          \| matches the literal | and | has special meaning (or) and#          () have special meaning and \( \) stand for literal ( ).##    type  (file matches this if `file %f` matches regular expression desc#          (the filename: part from `file %f` is removed))##    directory (matches any directory matching regular expression desc)##    include (matches an include directive)##    default (matches any file no matter what desc is)## Other lines should start with a space or tab and should be in the format:## keyword=commandNL (with no spaces around =), where keyword should be: ##    Open (if the user presses Enter or doubleclicks it), ##    View (F3), Edit (F4)##    Include is the keyword used to add any further entries from an include/#    section## command is any one-line shell command, with the following substitutions:## %% -> % character# %p -> name of the current file (without path, but pwd is its path)# %f -> name of the current file. Unlike %p, if file is located on a #	non-local virtual filesystem, i.e. either tarfs, mcfs or ftpfs,#	then the file will be temporarily copied into a local directory#	and %f will be the full path to this local temporal file.#	If you don't want to get a local copy and want to get the#	virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then#	use %d/%p instead of %f.# %d -> name of the current directory (pwd, without trailing slash)# %s -> "selected files", i.e. space separated list of tagged files if any#       or name of the current file# %t -> list of tagged files# %u -> list of tagged files (they'll be untaged after the command)## (If these 6 letters are in uppercase, they refer to the other panel.# But you shouldn't have to use it in this file.)### %cd -> the rest is a path mc should change into (cd won't work, since it's#	a child process).  %cd handles even vfs names.## %view -> the command you type will be piped into mc's internal file viewer#	if you type only the %view and no command, viewer will load %f file#	instead (i.e. no piping, so it is different to %view cat %f)#	%view may be directly followed by {} with a list of any of#	ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for#	text using backspace for bold and underscore) and unform#	(no highlighting for nroff sequences) separated by commas.## %var -> You use it like this: %var{VAR:default}.  This macro will expand#       to the value of the VAR variable in the environment if it's set#       otherwise the value in default will be used.  This is similar to#       the Bourne shell ${VAR-default} construct.## Rules are applied from top to bottom, thus the order is important.# If some actions are missing, search continues as if this target didn't# match (i.e. if a file matches the first and second entry and View action# is missing in the first one, then on pressing F3 the View action from# the second entry will be used. default should catch all the actions.## Any new entries you develop for you are always welcome if they are# useful on more than one system.  You can send your modifications# by e-mail to mc-devel@gnome.org### Changes ##### Reorganization: 2000-05-01 Michal Svec <rebel@penguin.cz>### TODO ##### Postscript	Open: ps2svga [gs -DEVICE=jpeg|zgv or something]# Images		asciiview# # All X Apps	[Nothing/Warning] if no DISPLAY# Not found	[Default/Warning]# Empty Output	[Default/Warning]# Edit:		CopyOut EDIT CopyIn# Security	Check gzip/bzip EDIT (mktemp)# # Maybe:	Open/XOpen/GOpen/KOpen/... for Console/X/GNOME/KDE/etc.### Archives #### darregex/\.[0-9]*\.[Dd][Aa][Rr]$        Open=%cd %p#udar        View=%view{ascii} dar -l `echo %f | sed 's/\.[0-9]*\.[Dd][Aa][Rr]$//'` -N# .tgz, .tpz, .tar.gz, .tar.z, .tar.Zregex/\.t([gp]?z|ar\.g?[zZ])$	Open=%cd %p#utar	View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -regex/\.tar\.bz$	# Open=%cd %p#utar	View=%view{ascii} bzip -dc %f 2>/dev/null | tar tvvf -regex/\.t(ar\.bz2|bz|b2)$	Open=%cd %p#utar	View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf -# .tar.lzma, .tlzregex/\.t(ar\.lzma|lz)$	Open=%cd %p#utar	View=%view{ascii} lzma -dc %f 2>/dev/null | tar tvvf -## For the new xz file format.# .tar.xz, .txzregex/\.t(ar\.xz|xz)$	Open=%cd %p#utar	View=%view{ascii} xz -dc %f 2>/dev/null | tar tvvf -# .tar.F - used in QNXregex/\.tar\.F$	# Open=%cd %p#utar	View=%view{ascii} freeze -dc %f 2>/dev/null | tar tvvf -# .qpr/.qpk - QNX Neutrino package installer files regex/\.(qp[rk])$	Open=%cd %p#utar	View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -# tarregex/\.(tar|TAR)$	Open=%cd %p#utar	View=%view{ascii} tar tvvf %f# lhatype/^LHa\ .*archive	Open=%cd %p#ulha	View=%view{ascii} lha l %f# arjregex/\.a(rj|[0-9][0-9])$	Open=%cd %p#uarj	View=%view{ascii} unarj l %f# haregex/\.([Hh][Aa])$	Open=%cd %p#uha	View=%view{ascii} ha lf %f# rarregex/\.[rR]([aA][rR]|[0-9][0-9])$	Open=%cd %p#urar	View=%view{ascii} rar v -c- %f# cpioshell/.cpio.Z	Open=%cd %p#ucpio	View=%view{ascii} gzip -dc '%f' | cpio -itv 2>/dev/nullshell/.cpio.gz	Open=%cd %p#ucpio	View=%view{ascii} gzip -dc '%f' | cpio -itv 2>/dev/nullshell/.cpio	Open=%cd %p#ucpio	View=%view{ascii} cpio -itv <'%f' 2>/dev/null# ls-lRregex/(^|\.)ls-?lR(\.g?z|Z|bz2)?$	Open=%cd %p#lslR# patchregex/\.(diff|patch)(\.(bz2|gz|Z))?$        Open=%cd %p#patchfs# ar libraryregex/\.s?a$	Open=%cd %p#uar	#Open=%view{ascii} ar tv %f	View=%view{ascii} file %f && nm %f# trpmregex/\.trpm$	Open=%cd %p#trpm	View=%view{ascii} rpm -qivl --scripts `basename %p .trpm`# RPM packages (SuSE uses *.spm for source packages)regex/\.(rpm|spm)$	Open=%cd %p#rpm	View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f# debregex/\.u?deb$	Open=%cd %p#deb	View=%view{ascii} dpkg-deb -c %f# ISO9660regex/\.iso$	Open=%cd %p#iso9660	View=%view{ascii} isoinfo -l -i %f# 7zip archives (they are not man pages)shell/.7z	View=%view{ascii} 7za l %f 2>/dev/null### Sources #### Cshell/.c	Open=%var{EDITOR:vi} %f# Fortranshell/.f	Open=%var{EDITOR:vi} %f	# Headerregex/\.(h|hpp)$	Open=%var{EDITOR:vi} %f# Objectshell/.o	#Open=%var{PAGER:more} %f	View=%view{ascii} file %f && nm %f# Asmshell/.s	Open=%var{EDITOR:vi} %f# C  regex/\.(C|cc|cpp)$	Open=%var{EDITOR:vi} %f### Documentation #### Texinforegex/\.(te?xi|texinfo)$# GNU Info pagetype/^Info\ text	Open=info -f %fshell/.info	Open=info -f %f# Manual page# Exception - .so libraries are not manual pagesregex/\.(so|so\.[0-9\.]*)$	View=%view{ascii} file %f && nm %fregex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$	Open=case %d/%f in */log/*|*/logs/*) cat %f ;; *) nroff -c -Tlatin1 -mandoc %f ;; esac | %var{PAGER:more}	View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) cat %f ;; *) nroff -c -Tlatin1 -mandoc %f ;; esac# Troff with me macros.# Exception - "read.me" is not a nroff file.shell/read.me	Open=	View=shell/.me	Open=nroff -c -Tlatin1 -me %f | %var{PAGER:more}	View=%view{ascii,nroff} nroff -c -Tlatin1 -me %f# Troff with ms macros.shell/.ms	Open=nroff -c -Tlatin1 -ms %f | %var{PAGER:more}	View=%view{ascii,nroff} nroff -c -Tlatin1 -ms %f# Manual page - compressedregex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$	Open=case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}	View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esacregex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$	Open=case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}	View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esacregex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$	Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}	View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff -c -Tlatin1 -mandoc ;; esacregex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$	Open=case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}	View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff -c -Tlatin1 -mandoc ;; esac### Images ###type/^GIF	Include=imagetype/^JPEG	Include=imagetype/^PC\ bitmap	Include=imagetype/^PNG	Include=imagetype/^TIFF	Include=imagetype/^PBM	Include=imagetype/^PGM	Include=imagetype/^PPM	Include=imagetype/^Netpbm	Include=imageshell/.xcf	Open=gimp %fshell/.xbm	Open=bitmap %fshell/.xpm	Include=image	View=sxpm %finclude/image	Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi	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=if [ "$DISPLAY" = "" ]; then play %f; else (xmms -e %f 1>/dev/null 2>&1 &); firegex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$       Open=mikmod %f       #Open=tracker %fregex/\.([wW][aA][wW]22)$       Open=vplay -s 22 %fregex/\.([mM][pP]3)$	Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (gmplayer %f >/dev/null 2>&1 &); fi	View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'regex/\.([oO][gG][gG])$	Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (gmplayer %f >/dev/null 2>&1 &); fi	View=%view{ascii} ogginfo %sregex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$	Open=timidity %fregex/\.([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 (gmplayer -playlist %f >/dev/null 2>&1 &); fi### Video ###regex/\.([aA][vV][iI])$	Include=videoregex/\.([aA][sS][fFxX])$	Include=videoregex/\.([dD][iI][vV][xX])$	Include=videoregex/\.([mM][oO][vV]|[qQ][tT])$	Include=videoregex/\.([mM][pP]4|[mM][pP][eE]?[gG])$	Include=videoregex/\.([vV][oO][bB])$	Include=videoregex/\.([wW][mM][vV])$	Include=videoregex/\.([oO][gG][mM])$	Include=videoregex/\.([dD][aA][tT])$	Include=videoregex/\.([fF][lL][iIvVcC])$	Include=videoregex/\.([nN][uU][tT])$	Include=videoregex/\.([sS][wW][fF])$	Include=videoregex/\.([mM][kK42][vV])$	Include=videoregex/\.([dD][vV])$	Include=videoregex/\.([nN][sS][vV])$	Include=videoregex/\.([yY][uU][vV]?4)$	Include=videoregex/\.(3[gG][pP])$	Include=videoregex/\.([mM][pP][cC])$	Include=videoregex/\.([mM][jJ][pP][gG])$	Include=videoregex/\.([mM][jJ][pP][eE][gG])$	Include=videoregex/\.([mM][xX][fF])$	Include=video#regex/\.([rR][aA]?[mM])$#	Open=(realplay %f >/dev/null 2>&1 &)regex/\.([rR][mM][vV][bB])$	Include=videoregex/\.([rR][aA]?[mM])$	Include=videoregex/\.(3[gG]?[pP])$	Include=videoinclude/video	Open=(mplayer %f >/dev/null 2>&1 &)	#Open=(gtv %f >/dev/null 2>&1 &)	#Open=(xanim %f >/dev/null 2>&1 &)### Documents #### Postscripttype/^PostScript	Open=(gv %f &)	View=%view{ascii} ps2ascii %f# PDFtype/^PDF	Open=(xpdf %f &)	#Open=(acroread %f &)	#Open=(ghostview %f &)	View=%view{ascii} pdftotext %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.# htmlregex/\.([hH][tT][mM][lL]?)$	Open=(if test -n "mozilla" && test -n "$DISPLAY"; then (mozilla file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null	View=%view{ascii} links -dump -force-html %f || lynx -dump -force_html %f# Openoffice Writerregex/\.(odt|ott|sxw|stw|doc|rtf|pdb|fodt|psw)$    Open=(oowriter %f &>/dev/null &)# Openoffice Calcregex/\.(ods|ots|sxc|stc|dif|dbs|xls|xlt|slk|fods|pxl)$    Open=(oocalc %f &>/dev/null &)# Openoffice Impressregex/\.(odp|otp|sxi|sti|ppt|pot|sxd|fodp|odg)$    Open=(ooimpress %f &>/dev/null &)# AbiWordshell/.abw	Open=(abiword %f &)# Microsoft Word Documentregex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$	Open=(abiword %f >/dev/null 2>&1 &)	View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %ftype/^Microsoft\ Word	Open=(abiword %f >/dev/null 2>&1 &)	View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f# RTF documentregex/\.([rR][tT][fF])$	Open=(abiword %f >/dev/null 2>&1 &)# Microsoft Excel Worksheetregex/\.([xX][lL][sSwW])$	Open=(gnumeric %f >/dev/null 2>&1 &)	View=%view{ascii} xls2csv %f || strings %ftype/^Microsoft\ Excel	Open=(gnumeric %f >/dev/null 2>&1 &)	View=%view{ascii} xls2csv %f || strings %f# Use OpenOffice.org to open any MS Office documentstype/^Microsoft\ Office\ Document	Open=(oowriter %f &)# Framemakertype/^FrameMaker	Open=fmclient -f %f# DVIregex/\.([dD][vV][iI])$	Open=if [ x$DISPLAY = x ]; then dvisvga %f; else (xdvi %f &); fi	View=%view{ascii} dvi2tty %f# TeXregex/\.([Tt][Ee][Xx])$	Open=%var{EDITOR:vi} %f# DJVUregex/\.(djvu|DJVU)$       Open=djview %f >/dev/null 2>&1 &### Miscellaneous #### Makefileregex/[Mm]akefile$	Open=make -f %f %{Enter parameters}# Imakefileshell/Imakefile	Open=xmkmf -a# Makefile.PL (MakeMaker)regex/^Makefile.(PL|pl)$	Open=%var{PERL:perl} %f# dbfregex/\.([dD][bB][fF])$       Open=%view{ascii} dbview %f       View=%view{ascii} dbview -b %f# REXX scriptregex/\.(rexx?|cmd)$       Open=rexx %f %{Enter parameters};echo "Press ENTER";read y### Plain compressed files #### ziptype/^([Zz][Ii][Pp])\ archive	Open=%cd %p#uzip	View=%view{ascii} unzip -v %f# zooregex/\.([Zz][Oo][Oo])$	Open=%cd %p#uzoo	View=%view{ascii} zoo l %f	# gziptype/^gzip	Open=gzip -dc %f | %var{PAGER:more}	View=%view{ascii} gzip -dc %f 2>/dev/null# bzip2type/^bzip2	Open=bzip2 -dc %f | %var{PAGER:more}	View=%view{ascii} bzip2 -dc %f 2>/dev/null# bziptype/^bzip	Open=bzip -dc %f | %var{PAGER:more}	View=%view{ascii} bzip -dc %f 2>/dev/null# compresstype/^compress	Open=gzip -dc %f | %var{PAGER:more}	View=%view{ascii} gzip -dc %f 2>/dev/null# lzmaregex/\.lzma$	Open=lzma -dc %f | %var{PAGER:more}	View=%view{ascii} lzma -dc %f 2>/dev/null# xzregex/\.xz$	Open=xz -dc %f | %var{PAGER:more}	View=%view{ascii} xz -dc %f 2>/dev/null### Default #### Default target for anything not described abovedefault/*	Open=	View=### EOF ###