[GRASS-user] grass prompt default working directory

Vincent Bain bain at toraval.fr
Tue Feb 26 05:26:05 PST 2013


More about my previous post, as a kind of self-answer:

I understand grass64 launched from a terminal shell is a child process
which inherits from the shell's working directory.

Sometimes paths are quite annoying to type (even with the help of
autocompletion, I'm lazy!).

For the time being I wrote a little script, located in my home directory
(~/g.cd). It evals GISDBASE, LOCATION_NAME, GISMAPSET with g.gisenv,
then changes directory to the current mapset. In order to take into
account the cd command in the parent process, I source the script from
grass prompt :
. g.cd

It's quite straight.
Any better/cleaner solution is welcome,

Vincent


Le mardi 26 février 2013 à 14:13 +0100, Vincent Bain a écrit :
> Hello list,
> when launching grass64, the working directory of the process (I mean the
> grass prompt in the terminal window) is located at user's home (e.g pwd
> command returns: /home/vincent). I did not find if this path was stored
> in a Grass environment variable ? is it possible to change the default
> path ?
> 
> The point is I often need to cd to the current mapset directory, it
> could be convenient to have the ability to set this default path at
> grass startup in a given location/mapset.
> 
> Has anyone any advice/idea for this ?
> Thanks,
> Vincent
> 
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
> 




More information about the grass-user mailing list