40 | | # keyword=commandNL (with no spaces around =), where keyword should be: |
41 | | # |
42 | | # Open (if the user presses Enter or doubleclicks it), |
43 | | # |
44 | | # View (F3), Edit (F4) |
45 | | # |
46 | | # Include is the keyword used to add any further entries from an include/ |
47 | | # section |
48 | | # |
49 | | # command is any one-line shell command, with the following substitutions: |
50 | | # |
51 | | # %% -> % character |
52 | | # %p -> name of the current file (without path, but pwd is its path). |
53 | | # Also provided to external application as MC_EXT_BASENAME |
54 | | # global variable |
55 | | # %f -> name of the current file. Unlike %p, if file is located on a |
56 | | # non-local virtual filesystem, i.e. either tarfs or ftpfs, |
57 | | # then the file will be temporarily copied into a local directory |
58 | | # and %f will be the full path to this local temporal file. |
59 | | # If you don't want to get a local copy and want to get the |
60 | | # virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then |
61 | | # use %d/%p instead of %f. |
62 | | # Also provided to external application as MC_EXT_FILENAME |
63 | | # global variable |
64 | | # %d -> name of the current directory (pwd, without trailing slash) |
65 | | # Also provided to external application as MC_EXT_CURRENTDIR |
66 | | # global variable |
67 | | # %s -> "selected files", i.e. space separated list of tagged files if any |
68 | | # or name of the current file. |
69 | | # Also provided to external application as MC_EXT_SELECTED |
70 | | # global variable |
71 | | # %t -> list of tagged files |
72 | | # Also provided to external application as MC_EXT_ONLYTAGGED |
73 | | # global variable |
74 | | # %u -> list of tagged files (they'll be untaged after the command) |
75 | | # |
76 | | # (If these 6 letters are in uppercase, they refer to the other panel. |
77 | | # But you shouldn't have to use it in this file.) |
78 | | # |
79 | | # |
80 | | # %cd -> the rest is a path mc should change into (cd won't work, since it's |
81 | | # a child process). %cd handles even vfs names. |
82 | | # |
83 | | # %view -> the command you type will be piped into mc's internal file viewer |
84 | | # if you type only the %view and no command, viewer will load %f file |
85 | | # instead (i.e. no piping, so it is different to %view cat %f) |
86 | | # %view may be directly followed by {} with a list of any of |
87 | | # ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for |
88 | | # text using backspace for bold and underscore) and unform |
89 | | # (no highlighting for nroff sequences) separated by commas. |
90 | | # |
91 | | # %var -> You use it like this: %var{VAR:default}. This macro will expand |
92 | | # to the value of the VAR variable in the environment if it's set |
93 | | # otherwise the value in default will be used. This is similar to |
94 | | # the Bourne shell ${VAR-default} construct. |
95 | | # |
96 | | # Rules are applied from top to bottom, thus the order is important. |
97 | | # If some actions are missing, search continues as if this target didn't |
98 | | # match (i.e. if a file matches the first and second entry and View action |
99 | | # is missing in the first one, then on pressing F3 the View action from |
100 | | # the second entry will be used. default should catch all the actions. |
101 | | # |
102 | | # Any new entries you develop for you are always welcome if they are |
103 | | # useful on more than one system. You can post your modifications |
104 | | # as tickets at www.midnight-commander.org |
| 54 | # KEYWORD=COMMAND<NL> (with no spaces around =) |
| 55 | # |
| 56 | # KEYWORD is one of the # following: |
| 57 | # |
| 58 | # Open |
| 59 | # COMMAND is run if the user presses Enter or double-clicks the file |
| 60 | # |
| 61 | # View |
| 62 | # COMMAND is run if the user presses F3 |
| 63 | # |
| 64 | # Edit |
| 65 | # COMMAND is run if the user presses F4 |
| 66 | # |
| 67 | # Include |
| 68 | # Add any further entries from an 'include/' section |
| 69 | # |
| 70 | # COMMAND is any one-line shell command, with the following substitutions: |
| 71 | # |
| 72 | # %% |
| 73 | # The '%' character |
| 74 | # |
| 75 | # %p or $MC_EXT_BASENAME |
| 76 | # Name of the current file (without path, but 'pwd' is its path.) |
| 77 | # |
| 78 | # %f or $MC_EXT_FILENAME |
| 79 | # Name of the current file. Unlike %p, if file is located on a non-local |
| 80 | # virtual filesystem (e.g. tarfs or ftpfs,) then the file will be |
| 81 | # temporarily copied into a local directory and %f will be the full path |
| 82 | # to this local temporal file. If you don't want to get a local copy and |
| 83 | # want to get the virtual fs path (like ftp://ftp.cvut.cz/pub/linux), |
| 84 | # then use %d/%p instead of %f. |
| 85 | # |
| 86 | # %d or $MC_EXT_CURRENTDIR |
| 87 | # Name of the current directory (pwd, without trailing slash) |
| 88 | # |
| 89 | # %s or $MC_EXT_SELECTED |
| 90 | # Space separated list of tagged files (if any) or the name of the |
| 91 | # current file. |
| 92 | # |
| 93 | # %t or $MC_EXT_ONLYTAGGED |
| 94 | # Space-spearted list of tagged files |
| 95 | # |
| 96 | # %u |
| 97 | # list of tagged files; untagged after command completes |
| 98 | # |
| 99 | # (If the letter following the % in the above six lines is in uppercase, it |
| 100 | # refers to the other panel. But you shouldn't have to use it in this |
| 101 | # file.) |
| 102 | # |
| 103 | # %cd PATH |
| 104 | # PATH that mc should change into ("cd" won't work because it's a child |
| 105 | # process.) %cd handles even vfs names. |
| 106 | # |
| 107 | # %view |
| 108 | # Output from COMMAND will be piped into mc's internal file viewer. If |
| 109 | # you type only '%view' and no COMMAND, viewer will directly load the %f |
| 110 | # file without piping. The result is the same as if COMMAND was "%view |
| 111 | # cat %f," but without the need to fork a shell, run 'cat', and read its |
| 112 | # output. |
| 113 | # |
| 114 | # %view may be directly followed by {} with one or more of the following |
| 115 | # separated by commas: |
| 116 | # ascii (ascii mode) |
| 117 | # hex (hex mode) |
| 118 | # nroff (colour highlighting for text using char<backspace>char |
| 119 | # for bold and <underscore><backspace>char for underscore) |
| 120 | # unform (no highlighting for nroff sequences) |
| 121 | # |
| 122 | # %var{VARNAME:default} |
| 123 | # Expands to the value of the VARNAME variable in the environment if it's |
| 124 | # set, otherwise the value in "default" is used. This is similar to the |
| 125 | # Bourne shell ${VAR-default} construct. |
| 126 | # |
| 127 | # Rules are applied from top to bottom, thus the order is important. If some |
| 128 | # actions are missing, search continues as if this target didn't match (i.e. if |
| 129 | # a file matches the first and second entry and View action is missing in the |
| 130 | # first one, then on pressing F3 the View action from the second entry will be |
| 131 | # used.) |
| 132 | # |
| 133 | # Any new entries you develop for you are always welcome if they are useful |
| 134 | # on more than one system. You can post your modifications as tickets at |
| 135 | # www.midnight-commander.org |