[GRASS-user] can I access mapset outside of grass, by using
python?
Nikos Alexandris
nikos.alexandris at felis.uni-freiburg.de
Sun Mar 7 22:08:31 EST 2010
Nikos Alexandris wrote:
> > The thing that troubles me most currently is: using normal grass
> > sessions you get entries recorded in
> > "/grassdb/location/mapset/.bash_history" while working with "pure" bash
> > shell entries go in "~/.bash_history".
> >
> > - Merging existing "grass-bash_history(-ies)" with "bash_history" would
> > probably be NOT a good idea.
> >
> > - Trying to separate (somehow) grass-commands history-entries and other
> > shell actions related to a specific grass-project (speak
> > grassdb/project/location/mapset) from other grass-projects or
> > non-grass-projects is, I think, non-sense.
> >
> > So, when working on a project, it is best practice to stick with
> > grass-sessions?
Glynn Clements:
> You can control where history entries are written via $HISTFILE and
> the "history" command. It's up to the user how they want to manage
> their shell history.
I've already have re-touched this trying to unify history across all
used shells. The relevant part of my .bashrc looks like:
--%<---
# append to the history file, don't overwrite it
shopt -s histappend
# ... or force ignoredups and ignorespace
HISTCONTROL=erasedups:ignoreboth # does this work?
# HISTIGNORE
HISTIGNORE='&:ls:ll:[bf]g:cd ~:cd ..:history *:clear:exit'
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=10000
HISTFILESIZE=15000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# multi-line commands
shopt -s cmdhist
--%<---
I think it's going to be really hard to mess up this more (?). Anyhow,
thank you for the feedback so far - no need to take this thread further,
I guess :-)
Nikos
More information about the grass-user
mailing list