فهرست منبع

init: ensure zsh environment variable SAVEHIST is set (#805)

nilason 4 سال پیش
والد
کامیت
1fdf7525e1
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      lib/init/grass.py

+ 2 - 0
lib/init/grass.py

@@ -1801,6 +1801,8 @@ def sh_like_startup(location, location_name, grass_env_file, sh):
     f = open(shell_rc_file, 'w')
     f = open(shell_rc_file, 'w')
 
 
     if sh == 'zsh':
     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(
         f.write('test -r {home}/.alias && source {home}/.alias\n'.format(
             home=userhome))
             home=userhome))
     else:
     else: