## B.8 Readline Interaction

The following predicates are available if SWI-Prolog is linked to the GNU readline library. This is by default the case on non-Windows installations and indicated by the Prolog flag readline.118swipl-win.exe uses its own history system and does not support these predicates. See also readline(3).

rl_read_init_file(+File)
  Read a readline initialisation file. Readline by default reads `/.inputrc`. This predicate may be used to read alternative readline initialisation files.
rl_add_history(+Line)
  Add a line to the Control-P/Control-N history system of the readline library.
rl_write_history(+FileName)
  Write current history to FileName. Can be used from at_halt/1 to save the history.
rl_read_history(+FileName)
  Read history from FileName, appending to the current history.