[not loaded]
console_input.pl -- Support entering toplevel queries
This module implements complete_input/4, which is used notably by the command line editor library(edit) to perform context aware TAB completion. It is a seperate library such that other input scenarios can reuse this code.
- prolog:complete_input(+BeforeCursor:string, +AfterCursor:string, -Delete:atom, -Completions:list) is semidet[multifile]
- Compute auto completions for the input line
BeforeCursor+AfterCursor. Implemented completions
- Files<br>
- Text starting
'<prefix>(single quotes) is completed as a file. If there is a single matching file a terminating `'` is added. - If the start of the line is
[<prefix>and text can be a non-quoted atom, look for Prolog files with this name. Directories can be inserted as/(unquoted), as long as each segment is a valid atom. If a single.plfile is found it is closed with], without the extension. - Text starting
library(<prefix>is completed as a library file using the same rules as[<prefix>, but looking in all library directories instead of the current directory.
- Text starting
- Atoms
<prefix>is used to complete atoms that can be written without quotes (excluding symbol atoms such as-->) and are permanent, i.e., have references from clauses records, flags, foreign code, etc. - Variables
<Prefix>is completed as an atom if it is a valid variable name. It is completed with other atoms from the query being edited using the same search as Emacs dabbrev (Dynamic Abbreviation).$<Prefix>expands to saved toplevel variables.
- Files<br>