ic icon indicating copy to clipboard operation
ic copied to clipboard

History doesn't persist across sessions

Open robacarp opened this issue 1 year ago • 1 comments

history navigation works well within a single prompt, but it's not persisted. If the console exits and is restarted, there is no history.

robacarp avatar Nov 09 '24 05:11 robacarp

History should be working on ic but not yet to crystal-i. This is because the code to handle history have not been imported to the compiler. (minimal impact):

def history_file
  if file = ENV["IC_HISTORY_FILE"]?
    return nil if file.empty?
    file
  else
    ::Path.home / ".ic_history"
  end
end

However if you creates your own repl using REPLy you can add these lines to handle the history.

I3oris avatar Jan 07 '25 21:01 I3oris