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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Dec 18 01:08:22 PST 2018


Author: martinl
Date: 2018-12-18 01:08:22 -0800 (Tue, 18 Dec 2018)
New Revision: 73814

Modified:
   grass/trunk/lib/init/grass.py
Log:
add powershell shell support to grass.py (see #3713)
	patch provided by pmolzer


Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py	2018-12-17 09:22:23 UTC (rev 73813)
+++ grass/trunk/lib/init/grass.py	2018-12-18 09:08:22 UTC (rev 73814)
@@ -1521,7 +1521,9 @@
         elif sh == "zsh":
             shellname = "Z Shell"
         elif sh == "cmd":
-            shellname = "Command Shell"
+            shellname = "Command Prompt"
+        elif sh == "powershell":
+            shellname = "Windows PowerShell"
         else:
             shellname = "shell"
     # check for SHELL
@@ -1538,7 +1540,7 @@
         grass_env_file = os.path.join(grass_config_dir, 'bashrc')
     elif sh == 'zsh':
         grass_env_file = os.path.join(grass_config_dir, 'zshrc')
-    elif sh == 'cmd':
+    elif sh in ['cmd', 'powershell']:
         grass_env_file = os.path.join(grass_config_dir, 'env.bat')
     else:
         grass_env_file = os.path.join(grass_config_dir, 'bashrc')



More information about the grass-commit mailing list