From: Oleg Broytman Date: Fri, 3 Jun 2016 12:56:54 +0000 (+0300) Subject: init.py: use only HISTSIZE, not HISTFILESIZE X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=f9b42a2b3f0fa5719d13bc54179bb9b5d8315c11;p=dotfiles.git init.py: use only HISTSIZE, not HISTFILESIZE HISTSIZE give the size in lines, HISTFILESIZE in bytes. --- diff --git a/lib/python/init.py b/lib/python/init.py index 1313c50..7377a26 100644 --- a/lib/python/init.py +++ b/lib/python/init.py @@ -43,15 +43,14 @@ def init(): pass # No such file def savehist(): - histfilesize = os.environ.get('HISTFILESIZE') \ - or os.environ.get('HISTSIZE') - if histfilesize: + histsize = os.environ.get('HISTSIZE') + if histsize: try: - histfilesize = int(histfilesize) + histsize = int(histsize) except ValueError: pass else: - readline.set_history_length(histfilesize) + readline.set_history_length(histsize) readline.write_history_file(histfile) import atexit