Ticket #4298: misc.sh; fix view for files

...on systems that have no /bin/cat (like NixOS).

When opening .diff or .patch files mcview invokes /bin/cat. NixOS has no
/bin/cat (the path to cat looks like /run/current-system/sw/bin/cat).
However cat is still in PATH, so replace /bin/cat with just cat. This
should not affect other systems as /bin should normally be in PATH.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Ulya Trofimovich 2021-10-29 21:47:21 +01:00 committed by Andrew Borodin
parent 8b79bfe32d
commit 044cd3d806

View File

@ -20,7 +20,7 @@ do_view_action() {
fi
;;
cat)
/bin/cat "${MC_EXT_FILENAME}" 2>/dev/null
cat "${MC_EXT_FILENAME}" 2>/dev/null
;;
ar)
file "${MC_EXT_FILENAME}" && nm -C "${MC_EXT_FILENAME}"