[GRASSLIST:5953] Re: Add location name to GIS Manager window name and to shell prompt

Markus Neteler neteler at itc.it
Tue Mar 1 15:51:50 EST 2005


On Tue, Mar 01, 2005 at 10:10:11AM +0100, Lorenzo Moretti wrote:
> Hi Markus
> 
> >On Mon, Feb 14, 2005 at 10:44:41AM +0100, Lorenzo Moretti wrote:
> >> Hi
> >> Grass 6.0 is multisession and now it's possible to open more
> >> locations but all windows and the prompt have the same name and it's
> >> difficult to navigate between the windows.
> >>
> >> It's useful to change these rows:
> >>
> >> lib/init/init.sh
> >>
> >> row 625
> >> -   echo "GRASS GRASS_VERSION_NUMBER > '" >> "$cshrc"
> >> +   echo "GRASS GRASS_VERSION_NUMBER - $LOCATION_NAME > '" >> "$cshrc"
> >>
> >> row 667
> >> -   echo "PS1='GRASS GRASS_VERSION_NUMBER:\w > '" >> "$bashrc"
> >> +   echo "PS1='GRASS GRASS_VERSION_NUMBER:\w - $LOCATION_NAME > '" >>
> >> "$bashrc"
> >
> >Then the prompt will become rather long, right?
> 
> Not too much. Example:
> 
> GRASS 6.0.cvs - spearfish57 >
> 
> Or if too much long an idea
> 
> G6cvs-spearfish57 >
> G6000-spearfish57 >
> 
> It's important to see what is the location in Grass 6.
> in daily work it's very useful because with Grass 6 is more easy to 
> work with 2, 3 or more locations together and the shell has always 
> the same name: this was not a problem in Grass 5.x with 1 location 
> any time.

I see. What about this:

GRASS 6.0.cvs(brdUTM33):~ >
              ^^^^^^^^ 
                     location

added to CVS.

Markus

PS: Please send diffs always as attachment, not inline.




More information about the grass-user mailing list