[GRASS-dev] aliases in GRASS

Glynn Clements glynn at gclements.plus.com
Thu Feb 22 16:42:16 EST 2007


Robert Nuske wrote:

> > > Looking forward to comments about the intention of line 815
> > > in 'grass-6.3.cvs/etc/Init.sh' .
> >
> > Probably someone forgot that $HOME hadn't been reverted at that point.
> > Reverting $PATH and $HOME should probably come first. Actually, I'm
> > not sure that there's any need to mess with $HOME; AFAICT, it was done
> > so that the .bash_history file would get stored in the mapset, but
> > that can be achieved by setting HISTFILE.
> 
> So, am I right that this line is useless in its current state and should be 
> changed or taken out? 

Yes.

> I would prefer if it would source the .alias in the users home directory.

That's potentically problematic.

If the user puts ". ~/.bashrc" into their ~/.grass.bashrc file, and
their ~/.bashrc sources ~/.alias, then having init.sh source ~/.alias
would result in it getting read twice.

Having Init.sh set up a .bashrc file is one thing (that name is built
into bash), but the ~/.alias file is something that specific
distribution vendors have cooked up for use by their default ~/.bashrc
(etc) scripts. If you aren't using such a platform, ~/.alias might not
even contain bash code.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list