[GRASS-SVN] r63523 - grass/trunk/lib/init

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Dec 13 06:50:46 PST 2014


Author: martinl
Date: 2014-12-13 06:50:46 -0800 (Sat, 13 Dec 2014)
New Revision: 63523

Modified:
   grass/trunk/lib/init/grass.py
Log:
grass.py: do not call g.gisenv three times...

Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py	2014-12-13 14:50:07 UTC (rev 63522)
+++ grass/trunk/lib/init/grass.py	2014-12-13 14:50:46 UTC (rev 63523)
@@ -1125,7 +1125,7 @@
         f.write("PS1='GRASS %s (%s):\w > '\n" % (grass_version, location_name))
     
     f.write("""grass_prompt() {
-	LOCATION="`g.gisenv GISDBASE`/`g.gisenv LOCATION_NAME`/`g.gisenv MAPSET`"
+	LOCATION="`g.gisenv get=GISDBASE,LOCATION_NAME,MAPSET separator='/'`"
 	if test -d "$LOCATION/grid3/G3D_MASK" && test -f "$LOCATION/cell/MASK" ; then
 		echo [%s]
 	elif test -f "$LOCATION/cell/MASK" ; then



More information about the grass-commit mailing list