diff options
| -rw-r--r-- | python/rc | 12 | ||||
| -rw-r--r-- | zsh/rc | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/python/rc b/python/rc new file mode 100644 index 0000000..cb560be --- /dev/null +++ b/python/rc @@ -0,0 +1,12 @@ +# -*- mode: python -*- + +import atexit +import os +import readline + +history_file = os.path.join(os.getenv('XDG_CACHE_HOME'), 'python_history') +if os.path.exists(history_file): + readline.read_history_file(history_file) +readline.set_history_length(1000) +atexit.register(readline.write_history_file, history_file) +del atexit, history_file, os, readline @@ -43,6 +43,7 @@ bindkey -e bindkey "^R" history-incremental-search-backward export EDITOR=vim +export PYTHONSTARTUP=${XDG_CONFIG_HOME}/python/rc export VISUAL=${EDITOR} setopt AUTO_CD |
