Not sure I missed something somewhere but I really couldn't find anything on this problem on the internet (except this unanswered StackOverflow question), so maybe this needs an issue here...
The problem I'm having is that my notebook history mixes with my iPython history (stored at ~/.ipython/profile_default/history.sqlite), which basically makes my iPython history useless, as e.g. I can't autocomplete import numpy as np since if I use the up arrow I get the last import cell from the last executed Jupyter notebook with a bunch of import statements instead of just the one line I wanted to autocomplete from my actual iPython history.
I think it would be a lot cleaner if Jupyter notebooks stored their history in a separate file (e.g. somewhere in ~/.jupyter) or if you include an option to disable the history for notebooks all together (I'm not sure why this needs to be saved anyways, at least I never saw the need to access it).
I'm using mac os x 10.13 and installed Jupyter Notebook with anaconda (version 5.0.0).
Thanks!
It doesn't make so much sense to save code run from a notebook, but it is IPython that's actually executing your code, which is why the history goes there.
You can use ipython_kernel_config.py to configure IPython when it's acting as a Jupyter kernel, without affecting the IPython terminal interface. You can set HistoryManager.enabled to turn history off entirely, or HistoryManager.hist_file to have a separate database. This will affect the Jupyter Qt console and terminal console as well if you use those - they're all using IPython as a kernel.
I wasn't able to set those options neither via Jupyter command line nor via config files, so I've just edited kernel.json to include this option:
jupyter kernelspec list, note path for python kernel%path from kernelspec%/kernel.json"--HistoryManager.enabled=False" to argv
Most helpful comment
I wasn't able to set those options neither via Jupyter command line nor via config files, so I've just edited kernel.json to include this option:
jupyter kernelspec list, note path for python kernel%path from kernelspec%/kernel.json"--HistoryManager.enabled=False"toargv