]> git.phdru.name Git - dotfiles.git/blob - .mc/menu
Feat(recode-filenames-recursive): Allow to omit parameters
[dotfiles.git] / .mc / menu
1 shell_patterns=0
2
3 # This is necessary to overcome a bug in mc - without this
4 # mc makes default wrong item
5 :  NOOP
6    :
7
8 @  Do something on all of the file(s) at once
9    CMD=%{Enter command}
10    exec $CMD %s
11
12 + t t
13 @  Do something on the selected files one by one
14    CMD=%{Enter command}
15    for f in %s; do
16      $CMD "$f"
17    done
18
19 + t lr
20 p  View the file in a pager
21    exec ${PAGER:-more} %f
22
23 + t lr
24 g  Edit the file in gvim
25    gvim %f &
26
27 + t lr
28 b  View the file in a browser
29    exec webbrowser-encode-url -e utf-8 file://%d/%f
30
31 + t lr
32 = f \.(htm(l?)|txt)$
33 w  View the file in a new browser window
34    exec webbrowser-encode-url -e utf-8 -n file://%d/%f
35
36 + t lr
37 t  View the file in a new browser tab
38    exec webbrowser-encode-url -e utf-8 -t file://%d/%f
39
40 + t lr
41 p  View the file in a new private browser tab
42    exec webbrowser -p file://%d/%f
43
44 += f \.fb2(\.bz2|\.gz|\.zip)?$ | f \.(chm|epub|htm(l?)|txt|rtf)$ & t lr
45 f  View fb2/chm/epub with fbreader
46    fbreader %f &
47
48 + t lr & f \.fb2(\.bz2|\.gz|\.zip)$
49 H  fb2html
50    case %f in
51      *.fb2.bz2) A="bunzip2 -c" ;;
52      *.fb2.gz) A="gunzip -c" ;;
53      *.fb2.zip) A="unzip -p" ;;
54      *.fb2) A="cat" ;;
55    esac
56    $A %f | xsltproc /usr/local/src/FictionBook/FB2_2_html_ru.xsl - | webstdin -t
57
58 + t lr & f \.fb2(\.bz2|\.gz|\.zip)$
59 T  fb2txt
60    case %f in
61      *.fb2.bz2) A="bunzip2 -c" ;;
62      *.fb2.gz) A="gunzip -c" ;;
63      *.fb2.zip) A="unzip -p" ;;
64      *.fb2) A="cat" ;;
65    esac
66    $A %f | xsltproc /usr/local/src/FictionBook/FB2_2_txt_ru.xsl - | webstdin -e txt -t
67
68 + t lr & f \.(pdf|PDF)$
69 v  View pdf
70    pdftotext -layout -q %f - | iconv.py -f utf-8 | ${PAGER:-more}
71
72 + t lr & f \.(pdf|PDF)$
73 e  View pdf with evince
74    evince %f &
75
76 += t lr & f \.(pdf|PDF)$
77 e  View pdf with qpdfview
78    if [ %d/%f = "`echo %d/%f | iconv -t utf-8`" ]; then qpdfview %f & else src=%d/%f; dest="$HOME/tmp/`echo $src | iconv -t koi8-r | koi2lat | sed 's!/!%!g'`"; ln -s "$src" "$dest" && qpdfview "$dest" & (sleep 3; exec rm -f "$dest") & fi
79
80 += t lr & f \.djvu(\.bz2|\.gz)?$
81 e  View djvu
82    djview %f &
83
84 + t lr & f \.((pdf|PDF|ps|PS)(\.bz2|\.gz)?|odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg|doc|DOC|rtf|docx|DOCX|xls|XLS|xlsx|XLSX)$
85 e  Edit (Open)Docs with libreoffice
86    libreoffice %f &
87
88 + t lr & f \.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg|doc|DOC|rtf|docx|DOCX|xls|XLS|xlsx|XLSX)$
89 v  View (Open)Docs with libreoffice
90    #libreoffice --headless --convert-to "txt:Text (encoded):UTF8" %f
91    libreoffice --cat %f | ${PAGER:-more}
92
93 += t lr & f \.(doc|DOC|rtf)$
94 d  View doc with catdoc
95    catdoc %f | ${PAGER:-more}
96
97 += t lr & f \.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
98 o  View OpenDoc with odt2txt
99    odt2txt %f | ${PAGER:-more}
100
101 += t lr & f \.(docx|DOCX)$
102 d  View docx with docx2txt
103    docx2txt %f - | iconv.py -f utf-8 | ${PAGER:-more}
104
105 += t lr & f \.(xls|XLS|xlsx|XLSX)$
106 o  View OpenXlsx with xlsx2csv
107    xlsx2csv %f | iconv.py -f utf-8 | ${PAGER:-more}
108
109 += t lr & f \.(xls|XLS)$
110 x  View xls with xls2csv
111    xls2csv %f | ${PAGER:-more}
112
113 + t lr & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm|ico|jp2|tif|TIF|tiff|TIFF|webp)$ | t t
114 e  Edit image(s)
115    gimp %s &
116
117 + t lr & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$ | t t
118 = t lr & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$
119 i  View image(s) scaled
120    xli -title "`echo %s | sed 's/[ .]/_/g'`" -zoom auto %s &
121
122 + t lr & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$ | t t
123 I  View image(s) full size
124    xli -title "`echo %s | sed 's/[ .]/_/g'`" %s &
125
126 + t lr & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$
127 I  Identify image
128    xli -identify %f
129
130 + t lr & f \.(ico|jp2|tif|TIF|tiff|TIFF|webp)$ | t t
131 = t lr & f \.(ico|jp2|tif|TIF|tiff|TIFF|webp)$
132 I  View icon, JPEG-2000, TIFF, WebP image
133    display %s &
134
135 + t lr & f \.(ico|jp2|tif|TIF|tiff|TIFF|webp)$
136 I  Identify image
137    identify %f
138
139 + t lr & f \.(aac|ac3|ape|cue|dts|flac|m3u8?|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
140 a  Add the audiofile(s) or playlist(s)
141    #if [ "`audtool --get-volume`" -eq 0 ]; then audacious & sleep 3; fi
142    #for f in %s; do
143    #   case "$f" in
144    #      *.m3u8?) while read song; do
145    #         audtool --playlist-addurl "$song"
146    #      done < "$f" ;;
147    #      *) audtool --playlist-addurl "$f" ;;
148    #   esac
149    #done
150    deadbeef --queue %s &
151
152 + t lr & f \.(aac|ac3|ape|cue|dts|flac|m3u8?|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
153 = t lr & f \.(aac|ac3|ape|cue|dts|flac|m3u8?|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$
154 p  Load the audiofile(s) or playlist(s)
155    #if [ "`audtool --get-volume`" -eq 0 ]; then audacious & sleep 3; fi
156    #audtool --playlist-clear
157    #for f in %s; do
158    #   case "$f" in
159    #      *.m3u8?) while read song; do
160    #         audtool --playlist-addurl "$song"
161    #      done < "$f" ;;
162    #      *) audtool --playlist-addurl "$f" ;;
163    #   esac
164    #done
165    deadbeef %s & (sleep 1; exec deadbeef --stop)
166
167 + t lr & f \.(aac|ac3|ape|cue|dts|flac|m3u8?|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
168 P  Play the audiofile(s) or playlist(s)
169    #if [ "`audtool --get-volume`" -eq 0 ]; then audacious & sleep 3; fi
170    #audtool --playlist-clear
171    #for f in %s; do
172    #   case "$f" in
173    #      *.m3u8?) while read song; do
174    #         audtool --playlist-addurl "$song"
175    #      done < "$f" ;;
176    #      *) audtool --playlist-addurl "$f" ;;
177    #   esac
178    #done
179    #exec audtool --playback-play
180    deadbeef %s &
181    #mplayer -playlist %f &
182
183 + t lr & f \.m3u8?
184 R  Play the playlist in random order
185    "$HOME"/prog/audio-cdr-video/audio/shuffle-playlist.py %f /tmp/random-playlist-tmp.m3u
186    #if [ "`audtool --get-volume`" -eq 0 ]; then audacious & sleep 3; fi
187    #audtool --playlist-clear
188    #while read song; do
189    #   audtool --playlist-addurl "$song"
190    #done < /tmp/random-playlist-tmp.m3u
191    #audtool --playback-play
192    deadbeef /tmp/random-playlist-tmp.m3u &
193    #mplayer -playlist /tmp/random-playlist-tmp.m3u &
194    (sleep 5; exec rm /tmp/random-playlist-tmp.m3u) &
195
196 + t lr & f \.(m3u8?|mp3|MP3|cue|aac|ac3|ape|dts|flac|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$
197 i  Audio/video info
198    exec "$HOME"/.config/mpv/mpv_identify.sh %f
199
200 + t d & f (video_ts|VIDEO_TS)$
201 i  DVD info
202    exec "$HOME"/.config/mpv/mpv_identify.sh .
203
204 + f \.(aac|ac3|ape|cue|dts|flac|m3u8?|mp3|MP3|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|iso|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$ | t d | t t
205 m  Play video file(s) with mpv (quiet)
206    AUDIO_VOLUME=80
207    export AUDIO_VOLUME
208    mplayer %s &
209
210 + f \.(aac|ac3|ape|cue|dts|flac|m3u8?|mp3|MP3|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|iso|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$ | t d | t t
211 m  Play video file(s) with mpv (normal)
212    mplayer %s &
213
214 + f \.(aac|ac3|ape|cue|dts|flac|m3u8?|mp3|MP3|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|iso|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$ | t d | t t
215 = f \.(aac|ac3|ape|cue|dts|flac|m3u8?|mp3|MP3|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|iso|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$
216 m  Play video file(s) with mpv (loud)
217    AUDIO_VOLUME=120
218    export AUDIO_VOLUME
219    mplayer %s &
220
221 + f \.(aac|ac3|ape|cue|dts|flac|m3u8?|mp3|MP3|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|iso|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$ | t d | t t
222 m  Play video file(s) with mpv (louder)
223    AUDIO_VOLUME=150
224    export AUDIO_VOLUME
225    mplayer %s &
226
227 + f \.(aac|ac3|ape|cue|dts|flac|m3u8?|mp3|MP3|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|iso|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$ | t d | t t
228 m  Play video file(s) with mpv (ask for volume)
229    AUDIO_VOLUME=%{Enter volume}
230    export AUDIO_VOLUME
231    mplayer %s &
232
233 + f \.(m3u8?|mp3|MP3|cue|aac|ac3|ape|dts|flac|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$ | t t
234 M  Play audio/video with mpv GUI
235    gmplayer %s &
236
237 += t d & f (video_ts|VIDEO_TS)$
238 d  Play DVD directory with mpv
239    mplayer -dvd-device . dvd:// &
240
241 + t d & f (video_ts|VIDEO_TS)$
242 D  Play DVD directory with mpv GUI
243    gmplayer -dvd-device . dvd:// &
244
245 + t d & f (video_ts|VIDEO_TS)$
246 t  Play DVD title with mpv
247    title=%{Enter title}
248    mplayer -dvd-device . dvd://"$title" &
249
250 + t d & f (video_ts|VIDEO_TS)$
251 T  Play DVD title with mpv GUI
252    title=%{Enter title}
253    gmplayer -dvd-device . dvd://"$title" &
254
255 + t d
256 p  Play directory with mpv
257    mplayer %f/* &
258
259 + t d
260 P  Play directory with mpv GUI
261    gmplayer %f/* &
262
263 + t d & f ^\.\.$
264 b  Compress the current subdirectory to tar.bz2
265    Pwd="`basename %d /`"
266    echo -n "Name of the distribution file (without extension) [$Pwd]: "
267    read tar
268    if [ "$tar"x = x ]; then tar="$Pwd"; fi
269    cd .. && tar cvf - "$Pwd" | bzip2 -f9 > "$tar".tar.bz2 &&
270    echo ../"$tar".tar.bz2 created.
271
272 + t d & f ^\.\.$
273 g  Compress the current subdirectory to tar.gz
274    Pwd="`basename %d /`"
275    echo -n "Name of the distribution file (without extension) [$Pwd]: "
276    read tar
277    if [ "$tar"x = x ]; then tar="$Pwd"; fi
278    cd .. && tar cvf - "$Pwd" | gzip -f9 > "$tar".tar.gz &&
279    echo ../"$tar".tar.gz created.
280
281 + t d & f ^\.\.$
282 l  Compress the current subdirectory to tar.lzma
283    Pwd="`basename %d /`"
284    echo -n "Name of the distribution file (without extension) [$Pwd]: "
285    read tar
286    if [ "$tar"x = x ]; then tar="$Pwd"; fi
287    cd .. && tar cvf - "$Pwd" | lzma -f9 > "$tar".tar.lzma &&
288    echo ../"$tar".tar.lzma created.
289
290 + t d & f ^\.\.$
291 x  Compress the current subdirectory to tar.xz
292    Pwd="`basename %d /`"
293    echo -n "Name of the distribution file (without extension) [$Pwd]: "
294    read tar
295    if [ "$tar"x = x ]; then tar="$Pwd"; fi
296    cd .. && tar cvf - "$Pwd" | xz -f9 > "$tar".tar.xz &&
297    echo ../"$tar".tar.xz created.
298
299 + t d & f ^\.\.$
300 t  Compress the current subdirectory to tar
301    Pwd="`basename %d /`"
302    echo -n "Name of the distribution file (without extension) [$Pwd]: "
303    read tar
304    if [ "$tar"x = x ]; then tar="$Pwd"; fi
305    cd .. && tar cvf - "$Pwd" > "$tar".tar &&
306    echo ../"$tar".tar created.
307
308 + t d & f ^\.\.$
309 z  Compress the current subdirectory to zip
310    Pwd="`basename %d /`"
311    echo -n "Name of the distribution file (without extension) [$Pwd]: "
312    read zip
313    if [ "$zip"x = x ]; then zip="$Pwd"; fi
314    cd .. && zip -r9 "$zip".zip "$Pwd" &&
315    echo ../"$zip".zip created.
316
317 + t d & f ^\.\.$
318 y  Compress the current subdirectory to zip recoding filenames
319    Pwd="`basename %d /`"
320    echo -n "Name of the distribution file (without extension) [$Pwd]: "
321    read zip
322    if [ "$zip"x = x ]; then zip="$Pwd"; fi
323    cd .. && zip.py "$zip".zip "$Pwd" &&
324    echo ../"$zip".zip created.
325
326 + t d & f ^\.\.$
327 7  Compress the current subdirectory to 7z
328    Pwd="`basename %d /`"
329    echo -n "Name of the distribution file (without extension) [$Pwd]: "
330    read ar
331    if [ "$ar"x = x ]; then ar="$Pwd"; fi
332    cd .. && 7zr a "$ar".7z "$Pwd" &&
333    echo ../"$ar".7z created.
334
335 + ! f \.(bz2|gz|lz|lzma|7z|xz|zip|ZIP)$ & t lr
336 z  bzip2 the file
337    exec bzip2 -9 %f
338
339 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
340 z  gzip the file
341    exec gzip -9 %f
342
343 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
344 z  lzip the file
345    exec lzip -9 %f
346
347 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
348 z  lzma the file
349    exec lzma -9 %f
350
351 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
352 z  7z the file/directory
353    exec 7zr a %f.7z %f
354
355 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
356 z  xz the file
357    exec xz -9 %f
358
359 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
360 z  zip the file/directory
361    exec zip -r9 %f.zip %f
362
363 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
364 y  zip the file/directory recoding filename(s)
365    exec zip.py %f.zip %f
366
367 + t t
368 Z  zip selected files/directories
369    ZIP=%{Enter zip name}
370    exec zip -r9 "$ZIP" %s
371
372 + t t
373 Y  zip selected files/directories recoding filenames
374    ZIP=%{Enter zip name}
375    exec zip.py "$ZIP" %s
376
377 + f \.(tar\.(z|Z|bz2|gz|lz|lzma))|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
378 n  Create a directory for this archive
379    case %f in
380      *.tar.Z)    D="`basename %f .tar.Z`";;
381      *.tar.bz2)  D="`basename %f .tar.bz2`";;
382      *.tar.gz)   D="`basename %f .tar.gz`";;
383      *.tbz2)     D="`basename %f .tbz2`";;
384      *.tgz)      D="`basename %f .tgz`";;
385      *.tz)       D="`basename %f .tz`";;
386      *.tar.lz)   D="`basename %f .tar.lz`";;
387      *.tar.lzma) D="`basename %f .tar.lzma`";;
388      *.tar.7z)   D="`basename %f .tar.7z`";;
389      *.zip)      D="`basename %f .zip`";;
390      *.ZIP)      D="`basename %f .ZIP`";;
391      *.rar)      D="`basename %f .rar`";;
392      *.RAR)      D="`basename %f .RAR`";;
393      *.xz)       D="`basename %f .xz`";;
394      *.7z)       D="`basename %f .7z`";;
395    esac
396    exec mkdir "$D"
397
398 + F \.(tar\.(z|Z|bz2|gz|lz|lzma))|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & T r
399 N  Create a directory for the other archive
400    case %D/%F in
401      *.tar.Z)    D="`basename %F .tar.Z`";;
402      *.tar.bz2)  D="`basename %F .tar.bz2`";;
403      *.tar.gz)   D="`basename %F .tar.gz`";;
404      *.tbz2)     D="`basename %F .tbz2`";;
405      *.tgz)      D="`basename %F .tgz`";;
406      *.tz)       D="`basename %F .tz`";;
407      *.tar.lz)   D="`basename %F .tar.lz`";;
408      *.tar.lzma) D="`basename %F .tar.lzma`";;
409      *.tar.7z)   D="`basename %F .tar.7z`";;
410      *.zip)      D="`basename %F .zip`";;
411      *.ZIP)      D="`basename %F .ZIP`";;
412      *.rar)      D="`basename %F .rar`";;
413      *.RAR)      D="`basename %F .RAR`";;
414      *.xz)       D="`basename %F .xz`";;
415      *.7z)       D="`basename %F .7z`";;
416    esac
417    exec mkdir "$D"
418
419 + f \.(tar\.(z|Z|bz2|gz|lz|lzma|7z|xz))|(tbz2|tgz|tz)$ & t lr
420 x  Extract the contents of a compressed tar file
421    unset PRG
422    case %f in
423       *.tar.bz2|*.tbz2)
424          PRG="bunzip2 -c"
425       ;;
426       *.tar.gz|*.tar.z|*.tgz|*.tz|*.tar.Z)
427          PRG="gzip -dc"
428       ;;
429       *.tar.lz)
430          PRG="lzip -dc"
431       ;;
432       *.tar.lzma)
433          PRG="lzma -dc"
434       ;;
435       *.tar.7z)
436          PRG="7zr e -so"
437       ;;
438       *.tar.xz)
439          PRG="xz -dc"
440       ;;
441       *)
442       exit 1
443       ;;
444    esac
445    $PRG %f | tar xvpf -
446
447 + F \.(tar\.(z|Z|bz2|gz|lz|lzma|7z|xz))|(tbz2|tgz|tz)$ & T r
448 X  Extract the contents of an other compressed tar file
449    unset PRG
450    case %F in
451       *.tar.bz2|*.tbz2)
452          PRG="bunzip2 -c"
453       ;;
454       *.tar.gz|*.tar.z|*.tgz|*.tz|*.tar.Z)
455          PRG="gzip -dc"
456       ;;
457       *.tar.lz)
458          PRG="lzip -dc"
459       ;;
460       *.tar.lzma)
461          PRG="lzma -dc"
462       ;;
463       *.tar.7z)
464          PRG="7zr e -so"
465       ;;
466       *.tar.xz)
467          PRG="xz -dc"
468       ;;
469       *)
470       exit 1
471       ;;
472    esac
473    $PRG %D/%F | tar xvpf -
474
475 + f \.(bz2|egg|gz|lz|lzma|7z|xz|tar|whl|zip|ZIP|rar|RAR)$ & t lr
476 x  Extract a compressed file
477    case %f in
478      *.bz2)  P="bzip2 -d";;
479      *.gz)   P="gzip -d";;
480      *.lz)   P="lzip -d";;
481      *.lzma) P="lzma -d";;
482      *.7z)   P="7zr x";;
483      *.xz)   P="xz -d";;
484      *.tar)  P="tar xvpf";;
485      *.egg|*.whl|*.zip|*.ZIP) P="unzip";;
486      *.rar|*.RAR) P="unrar x -y";;
487    esac
488    exec $P %f
489
490 + F \.(bz2|egg|gz|lz|lzma|7z|xz|tar|whl|zip|ZIP|rar|RAR)$ & T r
491 X  Extract another compressed file
492    case %F in
493      *.bz2)  P="bzip2 -d";;
494      *.gz)   P="gzip -d";;
495      *.lz)   P="lzip -d";;
496      *.lzma) P="lzma -d";;
497      *.7z)   P="7zr x";;
498      *.xz)   P="xz -d";;
499      *.tar)  P="tar xvpf";;
500      *.egg|*.whl|*.zip|*.ZIP) P="unzip";;
501      *.rar|*.RAR) P="unrar x -y";;
502    esac
503    exec $P %D/%F
504
505 + t lr & f \.(zip|ZIP)$
506 y  Extract from zip recoding filenames
507    exec unzip.py %f
508
509 + T r & F \.(zip|ZIP)$
510 Y  Extract from other zip recoding filenames
511    exec unzip.py %D/%F
512
513 + t lr
514 v  View via mailcap
515    exec see %f
516
517 + t lr
518 c  Compare the file
519    exec cmp %D/%f %f
520
521 + t lr & T r
522 C  Compare these files
523    exec cmp %D/%F %f
524
525 + t lr
526 d  Diff the file
527    exec diff -u --speed-large-files %D/%f %f
528
529 + t lr & T r
530 D  Diff these files
531    exec diff -u --speed-large-files %D/%F %f
532
533 + t lr
534 v  vimdiff the file
535    exec vim -d %D/%f %f
536
537 + t lr & T r
538 V  vimdiff these files
539    exec vim -d %D/%F %f
540
541 + t d & ! f ^\.\.$
542 d  Diff the directory
543    exec diff -ru --speed-large-files \
544       -x CVS -x .git -x .hg -x .svn -x '*.py[co]' -x __pycache__ %D/%f %f
545
546 + t d & T d & ! F ^\.\.$
547 D  Diff these directories
548    exec diff -ru --speed-large-files \
549       -x CVS -x .git -x .hg -x .svn -x '*.py[co]' -x __pycache__ %D/%F %f
550
551 += f \.(asc|gpg|sig(n)?)$ & t lr
552 v  Verify signature
553    exec gpg --verify %f
554
555 + f \.(asc|gpg|sig(n)?)$ & t lr
556 v  Verify detached signature
557    exec gpg --verify %f "`echo %f | sed 's/\.[^.]*$//'`"
558
559 += f \.[1-8]$ | f \.man$ & t lr
560 1  Display the file with roff -man
561    %view nroff -man %f
562
563 m  View a manual page
564    MAN=%{Enter manual name}
565    %view man -P cat $MAN
566
567 + t dlr | t t
568 r  rsync the file(s) there
569    rsync -ahPv --del %s %D