Since updating from mc-4.8.26-1
to mc-4.8.28-1
, midnight commander stops using internal zip-viewer script and uses XDG-OPEN
instead, effectively opening the “Archive-Viewer (Engrampa)” on Xfce instead of opening the zip-view inside mc-terminal.
This seems to be a bug, because the scripts indicates the old behavior should still be desired:
From /usr/lib/mc/ext.d/archive.sh
in version 5.8.28
:
# $1 - action
# $2 - type of file
# $3 - pager
action=$1
filetype=$2
pager=$3
[ -n "${MC_XDG_OPEN}" ] || MC_XDG_OPEN="xdg-open"
do_view_action() {
#...
zip)
unzip -v "${MC_EXT_FILENAME}" 2> /dev/null || \
7za l "${MC_EXT_FILENAME}" 2> /dev/null
;;
#...
}
do_open_action() {
filetype=$1
pager=$2
#....
zip)
unzip -v "${MC_EXT_FILENAME}" 2> /dev/null || \
7za l "${MC_EXT_FILENAME}" 2> /dev/null
;;
#...
}
case "${action}" in
view)
do_view_action "${filetype}"
;;
open)
("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
do_open_action "${filetype}" "${pager}"
;;
*)
;;
esac
from ~/.config/mc.ext
(not modified by me):
#...
# zip
shell/i/.zip
Open=%cd %p/uzip://
View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zip
#...
It somehow seems that the archive.sh
script is not even be called…
Unfortunately I haven’t got more time to investigate in this.
Workaround for now is to install version 4.26 from pacman cache:
pacman -U mc-4.8.26-1-x86_64.pkg.tar.zst
The official bug report: https://midnight-commander.org/ticket/4368