Explorar o código

add powershell shell support to grass.py (see https://trac.osgeo.org/grass/ticket/3713)
patch provided by pmolzer


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73814 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa %!s(int64=6) %!d(string=hai) anos
pai
achega
020d3f9309
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      lib/init/grass.py

+ 4 - 2
lib/init/grass.py

@@ -1521,7 +1521,9 @@ def get_shell():
         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 @@ def get_grass_env_file(sh, grass_config_dir):
         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')