Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Dec 2015 23:48:17 +0100
From:      Bertram Scharpf <lists@bertram-scharpf.de>
To:        freebsd-questions@freebsd.org
Subject:   Re: freebsd-update editor choice
Message-ID:  <20151215224817.GB31657@becker.bs.l>
In-Reply-To: <20151215204601.bd653269.freebsd@edvax.de>
References:  <20151213182848.M69104@brightstar.bomgardner.net> <20151215124601.GA4020@becker.bs.l> <20151215204601.bd653269.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151215224817.GB31657>