I’m using Grass 7.0.1 under Ubuntu 14.04 with the ubuntugis-unstable PPA enabled, I have a .grass.bashrc file where I define some shell environment variables according to the manual 1:
$ cat .grass.bashrc
export GRASS_PAGER=more
However, when I issue g.list rast inside Grass I get the list of raster maps in a less-type viewer.
echo $GRASS_PAGER
pager
And I have to manually set the ‘GRASS_PAGER’ to ‘more’ each time I start Grass, this was working in 6.4 but stopped working in 7.0.1, if there’s a new way of achieving this, then the manual is outdated.
Also, I’d like to know how to modify the prompt inside Grass, in 6.4 I added a PS1 variable with my custom prompt (with colors and a new line before the ‘>’) but it doesn’t seem to work in 7.0.1, what would be the best way to get my prompt to be like this:
GRASS 7.0.1 (UTM18N):~
g.list type=raster
Thanks in advance
···
César Augusto Ramírez Franco
Laboratorio de Sistemas Complejos Naturales
Escuela de Geociencias - Facultad de Ciencias
Universidad Nacional de Colombia - Sede Medellín
Teléfono: (57-4) 430 9369 - 300 459 6085
2015-11-26 17:55 GMT+01:00 César Augusto Ramírez Franco <caesarivs@gmail.com>:
I'm using Grass 7.0.1 under Ubuntu 14.04 with the ubuntugis-unstable PPA
enabled, I have a .grass.bashrc file where I define some shell environment
variables according to the manual [1]:
This worked for the shell environmental variables, thanks a lot
However, as stated in my first mail, I’d like to customize my Grass prompt to add colors and a newline before the ‘>’, how can this be achieved? I tried adding a PS1 definition inside the bashrc file but it didn’t work
Thanks in advance
–
César Augusto Ramírez Franco
Laboratorio de Sistemas Complejos Naturales
Escuela de Geociencias - Facultad de Ciencias
Universidad Nacional de Colombia - Sede Medellín
Teléfono: (57-4) 430 9369 - 300 459 6085
On Fri, Nov 27, 2015 at 5:18 PM, César Augusto Ramírez Franco
<caesarivs@gmail.com> wrote:
Hello Martin
2015-11-26 18:08 GMT-05:00 Martin Landa <landa.martin@gmail.com>:
> export GRASS_PAGER=more
try to put this line to
.grass7/bashrc
This worked for the shell environmental variables, thanks a lot
However, as stated in my first mail, I'd like to customize my Grass prompt
to add colors and a newline before the '>', how can this be achieved? I
tried adding a PS1 definition inside the bashrc file but it didn't work
[neteler@oboe init]$ grep bashrc *
grass.py: grass_env_file = os.path.join(grass_config_dir, 'bashrc')
grass.py: grass_env_file = os.path.join(grass_config_dir, 'bashrc')
grass.py: # instead of changing $HOME, start bash with: --rcfile
"$LOCATION/.bashrc" ?
grass.py: # if so, must care be taken to explicity call
.grass.bashrc et al for
grass.py: home = location # save .bashrc in $LOCATION
grass.py: bashrc = os.path.join(home, ".bashrc")
grass.py: try_remove(bashrc)
grass.py: f = open(bashrc, 'w')
grass.py: for env_file in [os.path.join(userhome, ".grass.bashrc"),