39 # command is any one-line shell command, with the following substitutions: |
39 # command is any one-line shell command, with the following substitutions: |
40 # |
40 # |
41 # %% -> % character |
41 # %% -> % character |
42 # %p -> name of the current file (without path, but pwd is its path) |
42 # %p -> name of the current file (without path, but pwd is its path) |
43 # %f -> name of the current file. Unlike %p, if file is located on a |
43 # %f -> name of the current file. Unlike %p, if file is located on a |
44 # non-local virtual filesystem, i.e. either tarfs or ftpfs, |
44 # non-local virtual filesystem, i.e. either tarfs or ftpfs, |
45 # then the file will be temporarily copied into a local directory |
45 # then the file will be temporarily copied into a local directory |
46 # and %f will be the full path to this local temporal file. |
46 # and %f will be the full path to this local temporal file. |
47 # If you don't want to get a local copy and want to get the |
47 # If you don't want to get a local copy and want to get the |
48 # virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then |
48 # virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then |
49 # use %d/%p instead of %f. |
49 # use %d/%p instead of %f. |
50 # %d -> name of the current directory (pwd, without trailing slash) |
50 # %d -> name of the current directory (pwd, without trailing slash) |
51 # %s -> "selected files", i.e. space separated list of tagged files if any |
51 # %s -> "selected files", i.e. space separated list of tagged files if any |
52 # or name of the current file |
52 # or name of the current file |
53 # %t -> list of tagged files |
53 # %t -> list of tagged files |
54 # %u -> list of tagged files (they'll be untaged after the command) |
54 # %u -> list of tagged files (they'll be untaged after the command) |
56 # (If these 6 letters are in uppercase, they refer to the other panel. |
56 # (If these 6 letters are in uppercase, they refer to the other panel. |
57 # But you shouldn't have to use it in this file.) |
57 # But you shouldn't have to use it in this file.) |
58 # |
58 # |
59 # |
59 # |
60 # %cd -> the rest is a path mc should change into (cd won't work, since it's |
60 # %cd -> the rest is a path mc should change into (cd won't work, since it's |
61 # a child process). %cd handles even vfs names. |
61 # a child process). %cd handles even vfs names. |
62 # |
62 # |
63 # %view -> the command you type will be piped into mc's internal file viewer |
63 # %view -> the command you type will be piped into mc's internal file viewer |
64 # if you type only the %view and no command, viewer will load %f file |
64 # if you type only the %view and no command, viewer will load %f file |
65 # instead (i.e. no piping, so it is different to %view cat %f) |
65 # instead (i.e. no piping, so it is different to %view cat %f) |
66 # %view may be directly followed by {} with a list of any of |
66 # %view may be directly followed by {} with a list of any of |
67 # ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for |
67 # ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for |
68 # text using backspace for bold and underscore) and unform |
68 # text using backspace for bold and underscore) and unform |
69 # (no highlighting for nroff sequences) separated by commas. |
69 # (no highlighting for nroff sequences) separated by commas. |
70 # |
70 # |
71 # %var -> You use it like this: %var{VAR:default}. This macro will expand |
71 # %var -> You use it like this: %var{VAR:default}. This macro will expand |
72 # to the value of the VAR variable in the environment if it's set |
72 # to the value of the VAR variable in the environment if it's set |
73 # otherwise the value in default will be used. This is similar to |
73 # otherwise the value in default will be used. This is similar to |
74 # the Bourne shell ${VAR-default} construct. |
74 # the Bourne shell ${VAR-default} construct. |
85 |
85 |
86 |
86 |
87 # .so libraries |
87 # .so libraries |
88 # Exception - .so libraries are not manual pages |
88 # Exception - .so libraries are not manual pages |
89 regex/\.(so|so\.[0-9\.]*)$ |
89 regex/\.(so|so\.[0-9\.]*)$ |
90 View=%view{ascii} file %f && nm -C -D %f |
90 View=%view{ascii} file %f && nm -C -D %f |
91 |
91 |
92 # Object |
92 # Object |
93 type/^ELF |
93 type/^ELF |
94 #Open=%var{PAGER:more} %f |
94 #Open=%var{PAGER:more} %f |
95 View=%view{ascii} file %f && nm -C %f |
95 View=%view{ascii} file %f && nm -C %f |
96 |
96 |
97 ### Documentation ### |
97 ### Documentation ### |
98 |
98 |
99 # Texinfo |
99 # Texinfo |
100 regex/\.(te?xi|texinfo)$ |
100 regex/\.(te?xi|texinfo)$ |
101 |
101 |
102 # GNU Info page |
102 # GNU Info page |
103 type/^Info\ text |
103 type/^Info\ text |
104 Open=info -f %f |
104 Open=info -f %f |
105 |
105 |
106 shell/.info |
106 shell/.info |
107 Open=info -f %f |
107 Open=info -f %f |
108 |
108 |
109 include/image |
109 include/image |
110 Open=(see %f &) |
110 Open=(see %f &) |
111 View=%view{ascii} identify %f |
111 View=%view{ascii} identify %f |
112 #View=%view{ascii} asciiview %f |
112 #View=%view{ascii} asciiview %f |
113 |
113 |
114 # Old VLC under Debian have no association for wmv mimetype. |
114 # Old VLC under Debian have no association for wmv mimetype. |
115 regex/\.([wW][mM][vV])$ |
115 regex/\.([wW][mM][vV])$ |
116 Open=vlc %f & |
116 Open=vlc %f & |
117 |
117 |
118 regex/\.([aA][vV][iI])$ |
118 regex/\.([aA][vV][iI])$ |
119 Include=video |
119 Include=video |
120 regex/\.(3[gG][pP])$ |
120 regex/\.(3[gG][pP])$ |
121 Include=video |
121 Include=video |
122 regex/\.([aA][sS][fFxX])$ |
122 regex/\.([aA][sS][fFxX])$ |
123 Include=video |
123 Include=video |
124 regex/\.([dD][iI][vV][xX])$ |
124 regex/\.([dD][iI][vV][xX])$ |
125 Include=video |
125 Include=video |
126 regex/\.([mM][kK][vV])$ |
126 regex/\.([mM][kK][vV])$ |
127 Include=video |
127 Include=video |
128 regex/\.([mM][oO][vV]|[qQ][tT])$ |
128 regex/\.([mM][oO][vV]|[qQ][tT])$ |
129 Include=video |
129 Include=video |
130 regex/\.([mM][pP]4|[mM][pP][eE]?[gG])$ |
130 regex/\.([mM][pP]4|[mM][pP][eE]?[gG])$ |
131 Include=video |
131 Include=video |
132 # MPEG-2 TS container + H.264 codec |
132 # MPEG-2 TS container + H.264 codec |
133 regex/\.([mM][tT][sS])$ |
133 regex/\.([mM][tT][sS])$ |
134 Include=video |
134 Include=video |
135 regex/\.([vV][oO][bB])$ |
135 regex/\.([vV][oO][bB])$ |
136 Include=video |
136 Include=video |
137 regex/\.([wW][mM][vV])$ |
137 regex/\.([wW][mM][vV])$ |
138 Include=video |
138 Include=video |
139 regex/\.([fF][lL][iIcCvV])$ |
139 regex/\.([fF][lL][iIcCvV])$ |
140 Include=video |
140 Include=video |
141 regex/\.([oO][gG][mM])$ |
141 regex/\.([oO][gG][mM])$ |
142 Include=video |
142 Include=video |
143 |
143 |
144 include/video |
144 include/video |
145 Open=see %f |
145 Open=see %f |
146 |
146 |
147 shell/.chm |
147 shell/.chm |
148 Open=xchm %f & |
148 Open=xchm %f & |
149 |
149 |
150 shell/.djvu |
150 shell/.djvu |
151 Open=djview %f & |
151 Open=djview %f & |
152 |
152 |
153 shell/.fb2 |
153 shell/.fb2 |
156 shell/.epub |
156 shell/.epub |
157 Open=fbreader %f & |
157 Open=fbreader %f & |
158 |
158 |
159 # Makefile |
159 # Makefile |
160 regex/[Mm]akefile$ |
160 regex/[Mm]akefile$ |
161 Open=make -f %f %{Enter parameters} |
161 Open=make -f %f %{Enter parameters} |
162 |
162 |
163 # Imakefile |
163 # Imakefile |
164 shell/Imakefile |
164 shell/Imakefile |
165 Open=xmkmf -a |
165 Open=xmkmf -a |
166 |
166 |
167 # Makefile.PL (MakeMaker) |
167 # Makefile.PL (MakeMaker) |
168 regex/^Makefile.(PL|pl)$ |
168 regex/^Makefile.(PL|pl)$ |
169 Open=%var{PERL:perl} %f |
169 Open=%var{PERL:perl} %f |
170 |
170 |
171 shell/.my |
171 shell/.my |
172 Open=tmp=%f; echo ${tmp%.my} %f %{Enter opt:} %{Enter file:} |
172 Open=tmp=%f; echo ${tmp%.my} %f %{Enter opt:} %{Enter file:} |
173 |
173 |
174 # Open in Emacs. |
174 # Open in Emacs. |
175 regex/\.(c|cpp|cxx) |
175 regex/\.(c|cpp|cxx) |
176 Open=e %f |
176 Open=e %f |
177 # Open=sensible-editor %f |
177 # Open=sensible-editor %f |
178 regex/\.(h|hpp) |
178 regex/\.(h|hpp) |
179 Open=e %f |
179 Open=e %f |
180 shell/.(s|S) |
180 shell/.(s|S) |
181 Open=e %f |
181 Open=e %f |
182 shell/.java |
182 shell/.java |
183 Open=e %f |
183 Open=e %f |
184 shell/.f |
184 shell/.f |
185 Open=e %f |
185 Open=e %f |
186 regex/\.([Tt][Ee][Xx])$ |
186 regex/\.([Tt][Ee][Xx])$ |
187 Open=e %f |
187 Open=e %f |
188 #Open=%var{EDITOR:vi} %f |
188 #Open=%var{EDITOR:vi} %f |
189 regex/\.(sh|bash|tcsh) |
189 regex/\.(sh|bash|tcsh) |
190 Edit=e %f |
190 Edit=e %f |
191 |
191 |
192 # Object files. |
192 # Object files. |
193 regex/\.(o|obj) |
193 regex/\.(o|obj) |
194 #Open=sensible-pager %f |
194 #Open=sensible-pager %f |
195 View=%view{ascii} file %f && nm %f |
195 View=%view{ascii} file %f && nm %f |
196 shell/.class |
196 shell/.class |
197 View=%view{ascii} tmp=%p; javap -c ${tmp%%.class} |
197 View=%view{ascii} tmp=%p; javap -c ${tmp%%.class} |
198 |
198 |