From: Oleg Broytman Date: Wed, 21 Sep 2022 14:15:52 +0000 (+0300) Subject: .mc/menu: Fix calling PDF viewer X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=7bf60629da6a2ca6b1c9ccaf083a787a17a09042;p=dotfiles.git .mc/menu: Fix calling PDF viewer Convert the file name to KOI8-R before running `koi2lat`. --- diff --git a/.mc/menu b/.mc/menu index 5f5b606..d9cd8b0 100644 --- a/.mc/menu +++ b/.mc/menu @@ -71,7 +71,7 @@ e View pdf with evince += t lr & f \.(pdf|PDF)$ e View pdf with qpdfview - if [ "%d/%f" = "`echo %d/%f | iconv -t utf-8`" ]; then qpdfview %f & else src=%d/%f; dest="$HOME/tmp/`echo $src | koi2lat | sed 's!/!%!g'`"; ln -s "$src" "$dest" && qpdfview "$dest" & (sleep 3; exec rm -f "$dest") & fi + 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 += t lr & f \.djvu(\.bz2|\.gz)?$ e View djvu