.config/mc/mc.ext.cygwin
changeset 329 5c0a22da5ef3
parent 328 3e80c4af5ab6
child 330 6197aede6474
equal deleted inserted replaced
328:3e80c4af5ab6 329:5c0a22da5ef3
     1 # -*- mode: conf -*-
       
     2 # Midnight Commander 3.0 extension file
       
     3 # Warning: Structure of this file has changed completely with version 3.0
       
     4 #
       
     5 # All lines starting with # or empty lines are thrown away.
       
     6 # Lines starting in the first column should have following format:
       
     7 #
       
     8 # keyword/descNL, i.e. everything after keyword/ until new line is desc
       
     9 #
       
    10 # keyword can be:
       
    11 #
       
    12 #    shell (desc is, when starting with a dot, any extension (no wildcars),
       
    13 #          i.e. matches all the files *desc . Example: .tar matches *.tar;
       
    14 #          if it doesn't start with a dot, it matches only a file of that name)
       
    15 #
       
    16 #    regex (desc is an extended regular expression)
       
    17 #          Please note that we are using the GNU regex library and thus
       
    18 #          \| matches the literal | and | has special meaning (or) and
       
    19 #          () have special meaning and \( \) stand for literal ( ).
       
    20 #
       
    21 #    type  (file matches this if `file %f` matches regular expression desc
       
    22 #          (the filename: part from `file %f` is removed))
       
    23 #
       
    24 #    directory (matches any directory matching regular expression desc)
       
    25 #
       
    26 #    include (matches an include directive)
       
    27 #
       
    28 #    default (matches any file no matter what desc is)
       
    29 #
       
    30 # Other lines should start with a space or tab and should be in the format:
       
    31 #
       
    32 # keyword=commandNL (with no spaces around =), where keyword should be:
       
    33 #
       
    34 #    Open (if the user presses Enter or doubleclicks it),
       
    35 #
       
    36 #    View (F3), Edit (F4)
       
    37 #
       
    38 #    Include is the keyword used to add any further entries from an include/
       
    39 #    section
       
    40 #
       
    41 # command is any one-line shell command, with the following substitutions:
       
    42 #
       
    43 # %% -> % character
       
    44 # %p -> name of the current file (without path, but pwd is its path)
       
    45 # %f -> name of the current file. Unlike %p, if file is located on a
       
    46 #	non-local virtual filesystem, i.e. either tarfs, mcfs or ftpfs,
       
    47 #	then the file will be temporarily copied into a local directory
       
    48 #	and %f will be the full path to this local temporal file.
       
    49 #	If you don't want to get a local copy and want to get the
       
    50 #	virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then
       
    51 #	use %d/%p instead of %f.
       
    52 # %d -> name of the current directory (pwd, without trailing slash)
       
    53 # %s -> "selected files", i.e. space separated list of tagged files if any
       
    54 #       or name of the current file
       
    55 # %t -> list of tagged files
       
    56 # %u -> list of tagged files (they'll be untaged after the command)
       
    57 #
       
    58 # (If these 6 letters are in uppercase, they refer to the other panel.
       
    59 # But you shouldn't have to use it in this file.)
       
    60 #
       
    61 #
       
    62 # %cd -> the rest is a path mc should change into (cd won't work, since it's
       
    63 #	a child process).  %cd handles even vfs names.
       
    64 #
       
    65 # %view -> the command you type will be piped into mc's internal file viewer
       
    66 #	if you type only the %view and no command, viewer will load %f file
       
    67 #	instead (i.e. no piping, so it is different to %view cat %f)
       
    68 #	%view may be directly followed by {} with a list of any of
       
    69 #	ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for
       
    70 #	text using backspace for bold and underscore) and unform
       
    71 #	(no highlighting for nroff sequences) separated by commas.
       
    72 #
       
    73 # %var -> You use it like this: %var{VAR:default}.  This macro will expand
       
    74 #       to the value of the VAR variable in the environment if it's set
       
    75 #       otherwise the value in default will be used.  This is similar to
       
    76 #       the Bourne shell ${VAR-default} construct.
       
    77 #
       
    78 # Rules are applied from top to bottom, thus the order is important.
       
    79 # If some actions are missing, search continues as if this target didn't
       
    80 # match (i.e. if a file matches the first and second entry and View action
       
    81 # is missing in the first one, then on pressing F3 the View action from
       
    82 # the second entry will be used. default should catch all the actions.
       
    83 #
       
    84 # Any new entries you develop for you are always welcome if they are
       
    85 # useful on more than one system.  You can send your modifications
       
    86 # by e-mail to mc-devel@gnome.org
       
    87 
       
    88 
       
    89 # Manual page
       
    90 # Exception - .so libraries are not manual pages
       
    91 regex/\.(so|so\.[0-9\.]*)$
       
    92 	View=%view{ascii} file %f && nm %f
       
    93 
       
    94 ### Documentation ###
       
    95 
       
    96 # Texinfo
       
    97 regex/\.(te?xi|texinfo)$
       
    98 
       
    99 # GNU Info page
       
   100 type/^Info\ text
       
   101 	Open=info -f %f
       
   102 
       
   103 shell/.info
       
   104 	Open=info -f %f
       
   105 
       
   106 ### Miscellaneous ###
       
   107 
       
   108 # Makefile
       
   109 regex/[Mm]akefile$
       
   110 	Open=make -f %f %{Enter parameters}
       
   111 
       
   112 # Imakefile
       
   113 shell/Imakefile
       
   114 	Open=xmkmf -a
       
   115 
       
   116 # Makefile.PL (MakeMaker)
       
   117 regex/^Makefile.(PL|pl)$
       
   118 	Open=%var{PERL:perl} %f
       
   119 
       
   120 # dbf
       
   121 regex/\.([dD][bB][fF])$
       
   122        Open=%view{ascii} dbview %f
       
   123        View=%view{ascii} dbview -b %f
       
   124 
       
   125 # REXX script
       
   126 regex/\.(rexx?|cmd)$
       
   127        Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
       
   128 
       
   129 
       
   130 ### Default ###
       
   131 
       
   132 # Default target for anything not described above.
       
   133 default/*
       
   134 	Open=cygstart %f&
       
   135 	View=
       
   136 
       
   137 ### EOF ###