Setting variables for a running process

Ephrayim J. Naiman naiman at pegasus.UUCP
Sat May 25 02:25:15 AEST 1985


> For example, I get on a terminal not my usual one, forget to do a
> TERM type setting, and then run "send", our message-sending routine
> which is part of the mmdf mail system we use here. I compose the
> message and then want to use "vi" to edit it. When I run "vi", the
> screen display is all messed up because the TERM type is wrong.
> I can :q out of vi, and use ed instead, which is what I do, but I
> wonder if there is something I can do at that point to reset my
> terminal type without saving the text data, aborting "send", and
> then resetting and starting over? That is, terminate the mangled "vi",
> do <something> that resets the terminal type to the correct one, and
> then restart "vi" on the message text? (I would hope that there is some
> generic method to do this -- I'm not looking for specific help regarding
> this particular local mail tool.)


As you've probably gathered by now you can't reset your TERM variable
in the current process.

However, in vi there IS a way to change your terminal type.
The way to do it is to go into ex, change it and go back into vi.
The commands are :

Q			(put's you in ex)
set term=term_name
vi			(put's you in vi)
-- 

==> Ephrayim J. Naiman @ AT&T Information Systems Laboratories (201) 576-6259
Paths: [ihnp4, allegra, mtuxo, maxvax, cbosgd, lzmi, ...]!pegasus!naiman



More information about the Comp.unix mailing list