[GRASS-dev] aliases in GRASS

Robert Nuske rnuske at gwdg.de
Thu Feb 22 08:05:57 EST 2007


Hi there,

I am trying to get my aliases in the GRASS-Shell, preferable from my .bashrc 
(or at least a .alias-file).

If started form a bash, GRASS prepares its own .bashrc in the chosen Location 
and starts a child shell (= GRASS-Shell) from there, as stated 
in 'grass-6.3.cvs/etc/Init.sh'. This Shell knows only the setting from the 
newly created .bashrc, so I guess I need to get my aliases in that file.

In line 815 in 'grass-6.3.cvs/etc/Init.sh'  a .alias-file is executed if it is 
readable. Since the environment variable HOME is set to LOCATION in line 810 
it looks for a .alias file in LOCATION and not in the users home directory, 
is this intended?

If line 815 would read
    echo "test -r ${USERHOME}/.alias && . ${USERHOME}/.alias" >> "$bashrc"
instead of
    echo "test -r ~/.alias && . ~/.alias" >> "$bashrc"
the user's alias-settings would be carried over to the GRASS-Shell.

It would be even nicer if the GRASS-Startup-Script could parse my .bashrc, but 
I have no idea how to achieve that.


Looking forward to comments about the intention of line 815 
in 'grass-6.3.cvs/etc/Init.sh' .

Cheers,
  Robert




More information about the grass-dev mailing list