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