Pārlūkot izejas kodu

wxGUI: Use .wxgui_history as history file (#1917)

wxGUI (or the Console specifically) behaves now as another shell, so it keeps its own history. This creates consistent behavior regardless of the shell used in the terminal.  

Fixes #962.
Wolf Bergenheim 3 gadi atpakaļ
vecāks
revīzija
df0eeb472f
2 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. 2 1
      gui/wxpython/core/gconsole.py
  2. 2 1
      gui/wxpython/gui_core/prompt.py

+ 2 - 1
gui/wxpython/core/gconsole.py

@@ -18,6 +18,7 @@ This program is free software under the GNU General Public License
 @author Martin Landa <landa.martin gmail.com>
 @author Vaclav Petras <wenzeslaus gmail.com> (refactoring)
 @author Anna Kratochvilova <kratochanna gmail.com> (refactoring)
+@author Wolf Bergenheim <wolf bergenheim.net> (#962)
 """
 
 from __future__ import print_function
@@ -802,7 +803,7 @@ class GConsole(wx.EvtHandler):
         env = grass.gisenv()
         try:
             filePath = os.path.join(
-                env["GISDBASE"], env["LOCATION_NAME"], env["MAPSET"], ".bash_history"
+                env["GISDBASE"], env["LOCATION_NAME"], env["MAPSET"], ".wxgui_history"
             )
             fileHistory = codecs.open(filePath, encoding="utf-8", mode="a")
         except IOError as e:

+ 2 - 1
gui/wxpython/gui_core/prompt.py

@@ -15,6 +15,7 @@ This program is free software under the GNU General Public License
 @author Martin Landa <landa.martin gmail.com>
 @author Michael Barton <michael.barton@asu.edu>
 @author Vaclav Petras <wenzeslaus gmail.com> (copy&paste customization)
+@author Wolf Bergenheim <wolf bergenheim.net> (#962)
 """
 
 import os
@@ -85,7 +86,7 @@ class GPrompt(object):
                     env["GISDBASE"],
                     env["LOCATION_NAME"],
                     env["MAPSET"],
-                    ".bash_history",
+                    ".wxgui_history",
                 ),
                 encoding="utf-8",
                 mode="r",