The following predicates are only available if the linedit part of GNU Prolog has been installed.
Templates
Description
get_linedit_prompt(Prompt) succeeds if Prompt is the current linedit prompt, e.g. the top-level prompt is ’| ?-’. By default all other reads have an empty prompt.
Errors
Prompt is neither a variable nor an atom | type_error(atom, Pred) | |
Portability
GNU Prolog predicate.
Templates
Description
set_linedit_prompt(Prompt) sets the current linedit prompt to Prompt. This prompt will be displayed for reads from a terminal (except for top-level reads).
Errors
Prompt is a variable | instantiation_error | |
Prompt is neither a variable nor an atom | type_error(atom, Pred) | |
Portability
GNU Prolog predicate.
Templates
Description
add_linedit_completion(Word) adds Word in the list of completion words maintained by linedit (section 3.2.5). Only words containing letters, digits and the underscore character are added (if Word does not respect this restriction the predicate fails).
Errors
Word is a variable | instantiation_error | |
Word is neither a variable nor an atom | type_error(atom, Word) | |
Portability
GNU Prolog predicate.
Templates
Description
find_linedit_completion(Prefix, Word) succeeds if Word is a word beginning by Prefix and belongs to the list of completion words maintained by linedit (section 3.2.5). This predicate is re-executable on backtracking.
Errors
Prefix is a variable | instantiation_error | |
Prefix is neither a variable nor an atom | type_error(atom, Prefix) | |
Word is neither a variable nor an atom | type_error(atom, Word) | |
Portability
GNU Prolog predicate.