[GRASS-SVN] r55897 - grass/trunk/lib/init

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 18 06:40:19 PDT 2013


Author: martinl
Date: 2013-04-18 06:40:18 -0700 (Thu, 18 Apr 2013)
New Revision: 55897

Modified:
   grass/trunk/lib/init/grass.py
Log:
grass.py: add support for Z Shell


Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py	2013-04-18 13:23:31 UTC (rev 55896)
+++ grass/trunk/lib/init/grass.py	2013-04-18 13:40:18 UTC (rev 55897)
@@ -15,7 +15,7 @@
 #               command line options for setting the GISDBASE, LOCATION,
 #               and/or MAPSET. Finally it starts GRASS with the appropriate user
 #               interface and cleans up after it is finished.
-# COPYRIGHT:    (C) 2000-2012 by the GRASS Development Team
+# COPYRIGHT:    (C) 2000-2013 by the GRASS Development Team
 #
 #               This program is free software under the GNU General
 #               Public License (>=v2). Read the file COPYING that
@@ -780,6 +780,8 @@
             shellname = "Bash Shell" 
         elif sh == "sh":
             shellname = "Bourne Shell"
+        elif sh == "zsh":
+            shellname = "Z Shell"
         else:
             shellname = "shell"
     
@@ -787,10 +789,12 @@
         grass_env_file = os.path.join(grass_config_dir, 'cshrc')
     elif sh in ['bash', 'msh', 'cygwin']:
         grass_env_file = os.path.join(grass_config_dir, 'bashrc')
+    elif sh in ['zsh']:
+        grass_env_file = os.path.join(grass_config_dir, 'zshrc')
     else:
         grass_env_file = os.path.join(grass_config_dir, 'bashrc')
         warning(_("Unsupported shell <%s>: %s") % (sh, grass_env_file))
-              
+    
     # check for SHELL
     if not os.getenv('SHELL'):
         fatal(_("The SHELL variable is not set"))



More information about the grass-commit mailing list