The command line editor

The command line editor resides at the top-level of the system accepting queries from you. A query is a Prolog goal ended with a new line. It is a tradition that a period is used to terminate a query. In B-Prolog, as no query can expand over more than one line, the terminating period can be omitted.

The command line editor accepts the following editing commands:

^F Move the cursor one position forward.
^B Move the cursor one position backward.
^A Move the cursor to the beginning of the line.
^E Move the cursor to the end of the line.
^D Delete the character under the cursor.
^H Delete the character to the left of the cursor.
^K Delete the characters to the right of the cursor.
^U Delete the whole line.
^P Load the previous query in the buffer.
^N Load the next query in the buffer.

Notice that as mentioned above the command ^D will halt the system if the line is empty and the cursor is located in the beginning of the line.

Neng-Fa Zhou 2012-01-03