import os.path import sys xonsh_ext_dir = os.path.expanduser('~/.xonsh') if os.path.isdir(xonsh_ext_dir): sys.path.append(xonsh_ext_dir) from history_couchdb import CouchDBHistory $XONSH_HISTORY_BACKEND = CouchDBHistory $PL_RPROMPT = '!' # recommended if you use powerline, as {history} is slow