[GRASS-git] [OSGeo/grass] 2d24a4: init: Change the history file according to the cur...

Vaclav Petras noreply at github.com
Thu Sep 10 20:23:08 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/OSGeo/grass
  Commit: 2d24a42cd4b6c66ab81348aa61240e784df39032
      https://github.com/OSGeo/grass/commit/2d24a42cd4b6c66ab81348aa61240e784df39032
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2020-09-10 (Thu, 10 Sep 2020)

  Changed paths:
    M general/g.mapset/main.c
    M gui/wxpython/gmodeler/dialogs.py
    M gui/wxpython/gmodeler/frame.py
    M gui/wxpython/gui_core/forms.py
    M gui/wxpython/gui_core/goutput.py
    M gui/wxpython/gui_core/prompt.py
    M gui/wxpython/lmgr/frame.py
    M gui/wxpython/vnet/dialogs.py
    M lib/init/grass.py

  Log Message:
  -----------
  init: Change the history file according to the current mapset for Bash and GUI (#930)

Each new prompt checks the current mapset and when it is different, it write history (HISTFILE) to the old one, clears history list, and read history from the file in the new mapset. This is only for Bash.

There no need to warn about history for Bash in g.mapset anymore.

This also reloads history on change of current mapset in Console which at this point uses .bash_history too. Given the implementation of GConsoleWindow, even when the prompt/interactive console is hidden, giface needs to be passed, so the change needs to be present everywhere when GConsoleWindow is used. Direct usages of GPromptSTC could avoid the updates if history is not needed, but that's not implemented.

The old behavior was always there (with warning in g.mapset), but it became more important with always starting in a mapset as opposed to startup screen.




More information about the grass-commit mailing list