Re: [GRASS-dev] Custom GRASS command line prompt

2014-12-17 Thread Nikos Alexandris
Huidae Cho wrote: Mine looks like this (bash shell): grass_ps(){ echo G `g.gisenv LOCATION_NAME`/`g.gisenv MAPSET` } export PS1=\[\033]0;\$(grass_ps) \w\007\]\$(grass_ps) \w The prompt gets updated dynamically since grass_ps() is called every time you hit enter. Oh, this makes

Re: [GRASS-dev] Custom GRASS command line prompt

2014-12-17 Thread Nikos Alexandris
On 16.12.2014 00:14, Martin Landa wrote: Hi, 2014-12-15 11:33 GMT+01:00 Michel Wortmann wortm...@pik-potsdam.de: I was just implementing the same thing into my ~/.grass.bashrc (GRASS btw, preferable is .grass7/bashrc rather than .grass.bashrc. Martin But then, I guess, we need to duplicate

Re: [GRASS-dev] Custom GRASS command line prompt

2014-12-16 Thread Michel Wortmann
Thank you Nikos and others, Huidae's version works like a charm. I'm on G7.0.0b3 so the g.gisenv single call doesnt work for me, neither does the .grass7/bashrc for some reason. Best, Michel On 12/15/2014 11:14 PM, Martin Landa wrote: Hi, 2014-12-15 11:33 GMT+01:00 Michel Wortmann

Re: [GRASS-dev] Custom GRASS command line prompt

2014-12-16 Thread Martin Landa
Hi, 2014-12-16 14:57 GMT+01:00 Michel Wortmann wortm...@pik-potsdam.de: call doesnt work for me, neither does the .grass7/bashrc for some reason. thats strange, are we speaking about ~/.grass7/bashrc? Martin -- Martin Landa http://geo.fsv.cvut.cz/gwiki/Landa

Re: [GRASS-dev] Custom GRASS command line prompt

2014-12-16 Thread Markus Neteler
Michel, On Tue, Dec 16, 2014 at 2:57 PM, Michel Wortmann wortm...@pik-potsdam.de wrote: Thank you Nikos and others, Huidae's version works like a charm. I'm on G7.0.0b3 so the g.gisenv single call doesnt work for me, neither does the .grass7/bashrc for some reason. To be sure that you use

Re: [GRASS-dev] Custom GRASS command line prompt

2014-12-15 Thread Michel Wortmann
Hi Nikos, Hamish and list, you guys played around with your commandline prompts last year (see below), I was just implementing the same thing into my ~/.grass.bashrc (GRASS 7.0.0b3) but found that the location and mapset arent actually changed when changing them with g.mapset, i.e.

Re: [GRASS-dev] Custom GRASS command line prompt

2014-12-15 Thread Nikos Alexandris
On 15.12.2014 12:33, Michel Wortmann wrote: Hi Nikos, Hamish and list, you guys played around with your commandline prompts last year (see below), I was just implementing the same thing into my ~/.grass.bashrc (GRASS 7.0.0b3) but found that the location and mapset arent actually changed when

Re: [GRASS-dev] Custom GRASS command line prompt

2014-12-15 Thread Huidae Cho
Mine looks like this (bash shell): grass_ps(){ echo G `g.gisenv LOCATION_NAME`/`g.gisenv MAPSET` } export PS1=\[\033]0;\$(grass_ps) \w\007\]\$(grass_ps) \w The prompt gets updated dynamically since grass_ps() is called every time you hit enter. Huidae On Mon, Dec 15, 2014 at 6:15 AM,

Re: [GRASS-dev] Custom GRASS command line prompt

2014-12-15 Thread Martin Landa
Hi, 2014-12-15 22:34 GMT+01:00 Huidae Cho gras...@gmail.com: Mine looks like this (bash shell): grass_ps(){ echo G `g.gisenv LOCATION_NAME`/`g.gisenv MAPSET` btw, in trunk you can avoid calling `g.gisenv` twice g.gisenv get=LOCATION_NAME,MAPSET sep='/' Martin -- Martin Landa

Re: [GRASS-dev] Custom GRASS command line prompt

2014-12-15 Thread Huidae Cho
That's cool. I'll try it tonight. Thanks. -- Sent from my phone On Dec 15, 2014 5:12 PM, Martin Landa landa.mar...@gmail.com wrote: Hi, 2014-12-15 22:34 GMT+01:00 Huidae Cho gras...@gmail.com: Mine looks like this (bash shell): grass_ps(){ echo G `g.gisenv

Re: [GRASS-dev] Custom GRASS command line prompt

2013-08-01 Thread Nikos Alexandris
Nkos: Do you have customised prompts? Any ideas for a more productive command line? Hamish: I'd suggest to put the change in ~/.grass.bashrc instead. FWIW, I use now the following export PS1='\[\e[32m\]G$SHORT_VER\[\e[0m\] [ \[\e[33m\]${GLOCATION}\[\e[0m\]

Re: [GRASS-dev] Custom GRASS command line prompt

2013-08-01 Thread Nikos Alexandris
On Monday 29 of July 2013 17:29:29 Hamish wrote: Hamish wrote: # example of adding an RGB border color with a #RRGGBB code: echo -ne \033]11;#53186f\007 ... But I think changing the border with a RGB color per mapset or location would scale better if you were having a different

Re: [GRASS-dev] Custom GRASS command line prompt

2013-07-29 Thread Markus Neteler
On Sun, Jul 28, 2013 at 4:50 AM, Hamish hamis...@yahoo.com wrote: ... fwiw here's what I have there wrt the prompt: SHORT_VER=`echo $GRASS_VERSION | cut -f1,2 -d. | sed -e 's/\.//'` export PS1='G$SHORT_VER:\W ' export HISTSIZE=3000 Personally I would suggest 3 lines here (I use 50k).

Re: [GRASS-dev] Custom GRASS command line prompt

2013-07-29 Thread Nikos Alexandris
Hamish: ... fwiw here's what I have there wrt the prompt: SHORT_VER=`echo $GRASS_VERSION | cut -f1,2 -d. | sed -e 's/\.//'` export PS1='G$SHORT_VER:\W ' export HISTSIZE=3000 Markus Neteler wrote: Personally I would suggest 3 lines here (I use 50k). Better save than sorry :-)

Re: [GRASS-dev] Custom GRASS command line prompt

2013-07-29 Thread Hamish
Hamish wrote: # example of adding an RGB border color with a #RRGGBB code: echo -ne \033]11;#53186f\007 ... But I think changing the border with a RGB color per mapset or location would scale better if you were having a different color for each mapset/location. Or, for the MASK present I'd

Re: [GRASS-dev] Custom GRASS command line prompt

2013-07-29 Thread Hamish
Hamish wrote: # example of adding an RGB border color with a #RRGGBB code: echo -ne \033]11;#53186f\007 ... But I think changing the border with a RGB color per mapset or location would scale better if you were having a different color for each mapset/location. Or, for the MASK present I'd

Re: [GRASS-dev] Custom GRASS command line prompt

2013-07-28 Thread Nikos Alexandris
Nikos: I want to alter the default GRASS command line prompt. .. As a first experiment, I edited the corresponding file in place: grass7_trunk/dist.x86_64-unknown-linux-gnu/grass70.tmp, line 1039: .. f.write(PS1='G %s (%s/%s):\w '\n % (grass_version, location_name, mapset)) Now it

Re: [GRASS-dev] Custom GRASS command line prompt

2013-07-28 Thread Nikos Alexandris
Nikos: Now it appears like: G 7.0.svn (utm_37s/post):~ . My understanding is that I probably need to edit the file: grass7_trunk/dist.x86_64-unknown-linux-gnu/grass70.tmp Hamish: I'd suggest to put the change in ~/.grass.bashrc instead. Nikos: Hamish, don't want to waist your

Re: [GRASS-dev] Custom GRASS command line prompt

2013-07-28 Thread Hamish
Nikos: Just a thought: would be nice to customise as to have a top or a bottom info-line, or two info-lines below 80 chars (what's the max that should be respected?), see MarkusN's [Raster MASK present] command prompt magic using $PROMPT_COMMAND (set in $GISBASE/etc/Init.sh). or stuff can

[GRASS-dev] Custom GRASS command line prompt

2013-07-27 Thread Nikos Alexandris
I want to alter the default GRASS command line prompt. For my needs, I find it better to have the current Mapset shown along with the Location. As a first experiment, I edited the corresponding file in place: grass7_trunk/dist.x86_64-unknown-linux-gnu/grass70.tmp, line 1039: -

Re: [GRASS-dev] Custom GRASS command line prompt

2013-07-27 Thread Hamish
Nikos: I want to alter the default GRASS command line prompt. For my needs, I find it better to have the current Mapset shown along with the Location. As a first experiment, I edited the corresponding file in place: grass7_trunk/dist.x86_64-unknown-linux-gnu/grass70.tmp, line 1039: -