sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
Re: [SM-Discuss] $EDITOR undefined when spell is cast
- From: Sukneet Basuta <sukneet AT gmail.com>
- To: SM-Discuss <sm-discuss AT lists.ibiblio.org>
- Subject: Re: [SM-Discuss] $EDITOR undefined when spell is cast
- Date: Tue, 5 Jun 2012 07:21:30 -0400
On Tue, Jun 5, 2012 at 2:22 AM, Andraž 'ruskie' Levstik
<ruskie AT codemages.net> wrote:
> :2012-06-04T21:49:Sukneet Basuta:
>
>> Is $EDITOR expected to be defined when a spell is cast? The dwm spell
>> and a few others seem to assume to.
>> If so, nothing seems to create a .bashrc file for root, leaving
>> $EDITOR undefined unless you manually create it. Perhaps, the bash
>> spell can copy /etc/skel/.bashrc to /root/.bashrc to resolve this
>> issue.
>
> It gets set by /etc/profile.d/editor.sh
Sorry, I should have been more explicit. Running cast with sudo leaves
$EDITOR unset. sudo does not start a login shell, thus /etc/profile is
never run.
Looking into this a bit more, it looks like the "proper" way is to set
BASH_ENV in /etc/enviornment to ~/.bashrc or ~/.bash_profile and then
possibly sourcing /etc/profile.d/editor.sh in that file. Or sorcery
can possibly source /etc/profile.d/editor.sh to ensure it is set.
-
[SM-Discuss] $EDITOR undefined when spell is cast,
Sukneet Basuta, 06/04/2012
-
Re: [SM-Discuss] $EDITOR undefined when spell is cast,
Andraž 'ruskie' Levstik, 06/05/2012
-
Re: [SM-Discuss] $EDITOR undefined when spell is cast,
Sukneet Basuta, 06/05/2012
- Re: [SM-Discuss] $EDITOR undefined when spell is cast, Jaka Kranjc, 06/05/2012
-
Re: [SM-Discuss] $EDITOR undefined when spell is cast,
Sukneet Basuta, 06/05/2012
-
Re: [SM-Discuss] $EDITOR undefined when spell is cast,
Andraž 'ruskie' Levstik, 06/05/2012
Archive powered by MHonArc 2.6.24.