[GRASS-dev] [GRASS-SVN] r65307 - grass/trunk/lib/init
Huidae Cho
grass4u at gmail.com
Tue Jul 14 07:17:27 PDT 2015
Thanks, Martin.
Is there any good reason why grass.py imports environment variables in
load_env() and writes non-/^export/ lines (r65585 does not strip out
whitespaces) into MAPSET/.bashrc in bash_startup() instead of simply
sourcing or fully writing .grass7/bashrc? I see a couple of problems with
this two step approach.
1. /^export/ lines in .grass.bashrc don't work anymore with r65585. This
file used to be "fully" written into MAPSET/.bashrc.
2. Conditional constructs like the following are not supported in
.grass7/bashrc:
case $TERM in
xterm*)
export PS1=xterm # no space before export
;;
screen)
export PS1=screen
;;
esac
because load_env() would overwrite PS1 and bash_startup() won't write out
the /^export PS1/ lines. It will work if there are whitespaces before
export, but I would say that was not intended by you...
Regards,
Huidae
On Tue, Jul 14, 2015 at 8:51 AM, Martin Landa <landa.martin at gmail.com>
wrote:
> Hi,
>
> 2015-07-08 18:31 GMT+02:00 Huidae Cho <grass4u at gmail.com>:
> > I think the following change has to be reverted because it breaks aliases
> > and custom prompts defined in ~/.grass7/bashrc. Currently, only
> "NAME=VALUE"
> > lines are parsed from this file in load_env().
>
> sorry for delay, I took liberty to partly re-introduce r65307 in
> r65585. It should work with aliases now.
>
> Martin
>
> --
> Martin Landa
> http://geo.fsv.cvut.cz/gwiki/Landa
> http://gismentors.cz/mentors/landa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20150714/20ea19f2/attachment.html>
More information about the grass-dev
mailing list