freebsd-update editor choice

Bertram Scharpf lists at bertram-scharpf.de
Tue Dec 15 22:48:22 UTC 2015


Hi,

On Tuesday, 15. Dec 2015, 20:46:01 +0100, Polytropon wrote:
> On Tue, 15 Dec 2015 13:46:01 +0100, Bertram Scharpf wrote:
> > On Sunday, 13. Dec 2015, 12:31:22 -0600, Gene wrote:
> > The problem I fussed about many times and long times without
> > any understanding up to this day is not how but _where_ to
> > set the EDITOR environment variable. There is
> > 
> >   - /etc/login.conf
> 
> This will set environment variables globally for all users
> who login, not depending on the shell.

> > Some programs change their behaviour in dependence of the
> > EDITOR variable. For example if you log into a host with the
> > command
> > 
> >   $ ssh otherhost -t tmux
> > 
> > most of the above files are left unregarded and the TMux
> > option 'status-keys' may be set to an undesired value.
> 
> This depends on how login shells and interactive shells are
> being configured and how they inherit environmental variables.

I tested it yet another time. When I give this command:

  $ ssh otherhost -t tmux new-session irb

and the variable EDITOR is not mentioned in "login.conf", it
will be empty. Ruby's ENV[ "EDITOR"] will be nil and TMux's
option "status-keys" will be "emacs".

Setting "EDITOR=vi" in login.conf/default/setenv solves the
problem. But nowhere else.

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de


More information about the freebsd-questions mailing list