[GRASS-user] grass prompt when changing locations

Tyler Smith tyler.smith at mail.mcgill.ca
Wed Mar 14 12:08:55 EDT 2012


On Wed, Mar 14, 2012 at 10:33 AM, Micha Silver <micha at arava.co.il> wrote:
> On 03/14/2012 03:55 PM, Tyler Smith wrote:
>
>
> my prompt looks like this:
>
> GRASS 6.4.1 (dem):~ >
>
> The reference to the location '(dem)' stays, even after changing to
> another location. How do I make Grass update this?
>
>
> The new environment variables are stored in the $LOCATION_NAME/$MAPSET/.bashrc file (if you're using bash). But this file is not 'source'ed when changing mapsets. So you need to do:
> eval `g.gisenv`
> source $GISDBASE/$LOCATION_NAME/$MAPSET/.bashrc
>
> or manually reset the prompt:
> export PS1="GRASS-6.4.2 ($LOCATION_NAME) \w > "
>

Thanks!

There is no .bashrc file in the mapset directory, so I take it I would
have to set that up for each mapset in each location?

Manually resetting the prompt works fine, after eval 'g.gisenv`, so
that is what I'm using now.

Cheers,

Tyler


More information about the grass-user mailing list