40 # |
40 # |
41 # command is any one-line shell command, with the following substitutions: |
41 # command is any one-line shell command, with the following substitutions: |
42 # |
42 # |
43 # %% -> % character |
43 # %% -> % character |
44 # %p -> name of the current file (without path, but pwd is its path) |
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 |
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, |
46 # non-local virtual filesystem, i.e. either tarfs or ftpfs, |
47 # then the file will be temporarily copied into a local directory |
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. |
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 |
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 |
50 # virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then |
51 # use %d/%p instead of %f. |
51 # use %d/%p instead of %f. |
78 # Rules are applied from top to bottom, thus the order is important. |
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 |
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 |
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 |
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. |
82 # the second entry will be used. default should catch all the actions. |
83 |
83 # |
84 ### Archives ### |
84 # Any new entries you develop for you are always welcome if they are |
85 |
85 # useful on more than one system. You can post your modifications |
86 # .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk |
86 # as tickets at www.midnight-commander.org |
87 regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$ |
|
88 Open=%cd %p#utar |
|
89 View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf - |
|
90 |
|
91 regex/\.tar\.bz$ |
|
92 # Open=%cd %p#utar |
|
93 View=%view{ascii} bzip -dc %f 2>/dev/null | tar tvvf - |
|
94 |
|
95 regex/\.t(ar\.bz2|bz|b2)$ |
|
96 Open=%cd %p#utar |
|
97 View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf - |
|
98 |
|
99 # .tar.F - used in QNX |
|
100 regex/\.tar\.F$ |
|
101 # Open=%cd %p#utar |
|
102 View=%view{ascii} freeze -dc %f 2>/dev/null | tar tvvf - |
|
103 |
|
104 # .qpr/.qpk - QNX Neutrino package installer files |
|
105 regex/\.(qp[rk])$ |
|
106 Open=%cd %p#utar |
|
107 View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf - |
|
108 |
|
109 # tar |
|
110 regex/\.(tar|TAR)$ |
|
111 Open=%cd %p#utar |
|
112 View=%view{ascii} tar tvvf - < %f |
|
113 |
|
114 # lha |
|
115 type/^LHa\ .*archive |
|
116 Open=%cd %p#ulha |
|
117 View=%view{ascii} lha l %f |
|
118 |
|
119 # arj |
|
120 regex/\.a(rj|[0-9][0-9])$ |
|
121 Open=%cd %p#uarj |
|
122 View=%view{ascii} arj l %f |
|
123 |
|
124 # ha |
|
125 regex/\.([Hh][Aa])$ |
|
126 Open=%cd %p#uha |
|
127 View=%view{ascii} ha lf %f |
|
128 |
|
129 # rar |
|
130 regex/\.[rR]([aA][rR]|[0-9][0-9])$ |
|
131 Open=%cd %p#urar |
|
132 View=%view{ascii} rar v -c- %f |
|
133 |
|
134 # cab |
|
135 regex/\.([cC][aA][bB])$ |
|
136 Open=%cd %p#ucab |
|
137 View=%view{ascii} cabextract -l %f |
|
138 |
|
139 # cpio |
|
140 shell/.cpio.Z |
|
141 Open=%cd %p#ucpio |
|
142 View=%view{ascii} gzip -dc '%f' | cpio -itv 2>/dev/null |
|
143 |
|
144 shell/.cpio.gz |
|
145 Open=%cd %p#ucpio |
|
146 View=%view{ascii} gzip -dc '%f' | cpio -itv 2>/dev/null |
|
147 |
|
148 shell/.cpio |
|
149 Open=%cd %p#ucpio |
|
150 View=%view{ascii} cpio -itv <'%f' 2>/dev/null |
|
151 |
|
152 # ls-lR |
|
153 regex/(^|\.)ls-?lR(\.g?z|Z|bz2)?$ |
|
154 Open=%cd %p#lslR |
|
155 |
|
156 # patch |
|
157 regex/\.(diff|patch)(\.(bz2|gz|Z))?$ |
|
158 Open=%cd %p#patchfs |
|
159 |
|
160 # ar library |
|
161 regex/\.s?a$ |
|
162 Open=%cd %p#uar |
|
163 #Open=%view{ascii} ar tv %f |
|
164 View=%view{ascii} file %f && nm %f |
|
165 |
|
166 # trpm |
|
167 regex/\.trpm$ |
|
168 Open=%cd %p#trpm |
|
169 View=%view{ascii} rpm -qivl --scripts `basename %p .trpm` |
|
170 |
|
171 # RPM packages (SuSE uses *.spm for source packages) |
|
172 regex/\.(rpm|spm)$ |
|
173 Open=%cd %p#rpm |
|
174 View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f |
|
175 |
|
176 # deb |
|
177 regex/\.u?deb$ |
|
178 Open=%cd %p#deb |
|
179 View=%view{ascii} dpkg-deb -I %f && echo && dpkg-deb -c %f |
|
180 |
|
181 # dpkg |
|
182 shell/.debd |
|
183 Open=%cd %p#debd |
|
184 View=%view{ascii} dpkg -s `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'` |
|
185 # apt |
|
186 shell/.deba |
|
187 Open=%cd %p#deba |
|
188 View=%view{ascii} apt-cache show `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'` |
|
189 |
|
190 # ISO9660 |
|
191 regex/\.iso$ |
|
192 Open=%cd %p#iso9660 |
|
193 View=%view{ascii} isoinfo -l -i %f |
|
194 |
|
195 # 7zip archives (they are not man pages) |
|
196 shell/.7z |
|
197 View=%view{ascii} 7za l %f 2>/dev/null |
|
198 |
|
199 # .tar.xz, .txz |
|
200 regex/\.t(ar\.xz|xz)$ |
|
201 Open=%cd %p#utar |
|
202 View=%view{ascii} xz -dc %f 2>/dev/null | tar tvvf - |
|
203 |
87 |
204 ### Documentation ### |
88 ### Documentation ### |
205 |
89 |
206 # Texinfo |
90 # Texinfo |
207 regex/\.(te?xi|texinfo)$ |
91 regex/\.(te?xi|texinfo)$ |