By default, GHCi saves 100 lines of command history in ~/.ghc/ghci_history
. Can I increase this number?
I'm using GHC 7.6.3 on GNU/Linux.
On my system (GNU/Linux, GHC 7.6.3), GHCi is built against the haskeline library. According to this document , it can be customised by editing the ~/.haskeline
file:
maxhistorysize: Just 1000
As discussed this is the solution for Mac OSX, the other answer is for Linux. I found what your looking for here basically copy pasting the relevant information and formatting it below here.
The default is a history of 100 commands but you can change that by adding this line to your ~/.ghc/ghci.conf:
System.Console.Editline.Readline.stifleHistory 1000
which would increase your history to 1000 commands.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.