Skip to content

Commit

Permalink
init: ensure zsh environment variable SAVEHIST is set (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilason committed Jul 30, 2020
1 parent e33bcaa commit 1fdf752
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/init/grass.py
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,8 @@ def sh_like_startup(location, location_name, grass_env_file, sh):
f = open(shell_rc_file, 'w')

if sh == 'zsh':
if not os.getenv('SAVEHIST'):
os.environ['SAVEHIST'] = os.getenv('HISTSIZE')
f.write('test -r {home}/.alias && source {home}/.alias\n'.format(
home=userhome))
else:
Expand Down

0 comments on commit 1fdf752

Please sign in to comment.