a solution for high and dry xterm_title
Tribhuvan
loka at rcn.com
Sun Jan 5 10:14:16 UTC 2003
Tomas Styblo wrote
>Personally I think that relying on the title reporting ability
>is too error prone.
>
> From the point of view of the user the easiest way to restore
>the title is to simply generate it in the PS1 variable as a part of
>the command prompt.
>
>
I understand what you're thinking, but I think for average users without
a firm grasp on even shell programming the overhead may just be a bit
much (save for the learning experience). I like the xterm_title feature
and have written an enhancement for it (for next posting), but maybe
the restore feature can just be automatically turned off if we know a
cheap/buggy terminal is running mc.
Probably the safest thing to do is keep the switch handy to turn
the feature on/off via one of the dialog windows.
I use a TERMINALS environment variable for a number of settings.
export TERMINALS='xterm rxvt dtterm'
if ["` echo $TERMINALS | grep $TERM`"]
then ....
An array in the source code could contain a names of safe terminals,
then a "getenv($TERM)" could determine if $TERM is a safe one to
do the title refresh on exit -unless someone's spoofing...
What else can you do in a polski fiiat? Let them pass you...
In the meantime, I'm still working on the last patch - Solaris x86 uses
SA_RESTART in <sys/signal.h> rather than SA_INTERRUPT.
There's an #ifdef SA_RESTART earlier in the code I'm inserting into
the refresh function to get around SA_INTERRUPT
but it just hangs indefinetely without so far....
Tribhuvan
More information about the mc-devel
mailing list