In attempting to answer the question myself, I stumbled upon this question as well this question and found snippets that really didn't provide the OP with the complete, TL;DR information.
So for my own records and to make the answers on SO here more complete, I provided a quick implementation and check to "Increase iPython History Length."
Generate the iPython
config file
$ ipython profile create <profile name>
I just wanted this for my default config, so I ran:
$ ipython profile create
Modify the ipython_config.py
File
Running the above command creates an ipython_config.py
file, which (on *.nix
is stored at ~/.ipython/profile_default/ipython_config.py
These are the two lines that I uncommented and changed the values for:
Check to Ensure the Implementation Worked
Fire up iPython and run the commands found in the accepted answer above to ensure our new history_length = 100,000
.
benjamingross (develop*)$ ipython
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:14:23)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.3.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: %config TerminalInteractiveShell.history_length
Out[1]: 100000