scryer-prolog icon indicating copy to clipboard operation
scryer-prolog copied to clipboard

Include interactive top level keybindings in help text

Open constraintAutomaton opened this issue 1 month ago • 5 comments

The Scryer Prolog top-level is interactive and supports several query navigation commands:

  • Enter: Display the first result and end execution
  • a: Display all results
  • Space: Show the next result
  • Up arrow: Recall the previously entered query
  • and Others (I think)

It would be helpful if the binary's help command (-h, --help) included documentation for these commands.

constraintAutomaton avatar Nov 16 '25 08:11 constraintAutomaton

There is already documentation about that if you press h in a query:

?- (X = 1; X = 2).
   X = 1

SPACE, "n" or ";": next solution, if any
RETURN or ".": stop enumeration
"a": enumerate all solutions
"f": enumerate the next 5 solutions
"h": display this help message
"w": write terms without depth limit
"p": print terms with depth limit


;  X = 2.

However, this is also not documented anywhere if I'm not mistaken.

bakaq avatar Nov 16 '25 08:11 bakaq

Oh, I did not know, just adding this to the -h flag would be nice.

constraintAutomaton avatar Nov 16 '25 08:11 constraintAutomaton

I think this is a good idea.

jjtolton avatar Nov 21 '25 21:11 jjtolton

Please see the discussion in #3155. As mentioned there, I think an info page would be ideal, it is a huge plus of (for example) the SICStus documentation that it can be conveniently browsed and searched in Emacs.

The -h output could mention the info manual, where that and also the libraries and other issues can be explained more fully.

triska avatar Nov 21 '25 21:11 triska

Please see the discussion in #3155. As mentioned there, I think an info page would be ideal, it is a huge plus of (for example) the SICStus documentation that it can be conveniently browsed and searched in Emacs.

The -h output could mention the info manual, where that and also the libraries and other issues can be explained more fully.

Agreed, an info page would probably be better. But I think that it will be very difficult to get consensus on an info page haha.

jjtolton avatar Nov 27 '25 12:11 jjtolton