[GRASS-SVN] r30789 - grass/trunk/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Mar 28 21:41:32 EDT 2008
Author: hamish
Date: 2008-03-28 21:41:31 -0400 (Fri, 28 Mar 2008)
New Revision: 30789
Modified:
grass/trunk/lib/init/init.sh
Log:
set command history stuff without messing with /home/hb, add comment about possible --rcfile problems if the same is done for /.bashrc
Modified: grass/trunk/lib/init/init.sh
===================================================================
--- grass/trunk/lib/init/init.sh 2008-03-28 23:38:13 UTC (rev 30788)
+++ grass/trunk/lib/init/init.sh 2008-03-29 01:41:31 UTC (rev 30789)
@@ -924,6 +924,15 @@
;;
bash|msh)
+ # save command history in mapset dir and remember more
+ HISTFILE="$LOCATION/.bash_history"
+ if [ -z "$HISTSIZE" ] && [ -z "$HISTFILESIZE" ] ; then
+ export HISTSIZE=3000
+ fi
+
+ # instead of changing $HOME, start bash with: --rcfile "$LOCATION/.bashrc" ?
+ # if so, must care be taken to explicity call .grass.bashrc et al for
+ # non-interactive bash batch jobs?
USERHOME="$HOME" # save original home
HOME="$LOCATION" # save .bashrc in $LOCATION
export HOME
@@ -933,7 +942,7 @@
echo "test -r ~/.alias && . ~/.alias" >> "$bashrc"
echo "PS1='GRASS GRASS_VERSION_NUMBER ($LOCATION_NAME):\w > '" >> "$bashrc"
echo "PROMPT_COMMAND=$GISBASE/etc/prompt.sh" >> "$bashrc"
-
+
if [ -r "$USERHOME/.grass.bashrc" ]
then
cat "$USERHOME/.grass.bashrc" >> "$bashrc"
More information about the grass-commit
mailing list