Fancy way to display errors from a user menu?
- From: "JD" <john1doe ya ru>
- To: "MC" <mc gnome org>
- Cc:
- Subject: Fancy way to display errors from a user menu?
- Date: Mon, 04 Oct 2021 10:51:38 +0300
Hi!
When running commands from a user menu, we just print errors to stdout, right? This makes the screen flicker,
and also in order to look at those errors, you have to hide panels with C-o.
Can we somehow call the error dialog may be? Or is there any other way or a hint/workaround?
I even tried to call `%view` like this:
= t r
+ ! t t
d Diff against same named files
if [ "%d" = "%D" ]; then
%view MSG="The two directores must be different"; printf "\n%$((($(tput
cols)-${#MSG})/2))s%%s\n" " " "$MSG"
exit 1
fi
if [ -f %D/%f ]; then
mcdiff %d/%f %D/%f
fi
...but as soon as `%view` is declared in a menu item construct, it seems to affect literally everything,
including `mcdiff` command in this example (we can't somehow "close" `%view`?), which results in "Cannot get
terminal settings: Inappropriate ioctl for device (25)" error.
So, using `%view` is probably not the best possible solution after all :)
But may be there are some other ways? Printing to stdout from a menu doesn't seem like the most user-friendly
solution :)
--
JD
[Date Prev][Date Next] [Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]