mag*_*gus 5 bash ubuntu keyboard-shortcuts swi-prolog
当我按下向上/向下键时,我应该得到 - 就像 unix 一样 - 之前的命令,但我得到的是:
Welcome to SWI-Prolog (Multi-threaded, 32 bits, Version 6.0.0)
Copyright (c) 1990-2011 University of Amsterdam, VU Amsterdam
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
1 ?- ['nc'].
% nc compiled into nc 0.00 sec, 84 clauses
true.
2 ?- listing.
true.
Run Code Online (Sandbox Code Playgroud)
(我按“向上”箭头键返回“列表”命令……然后……)
3 ?- **^[[A**
Run Code Online (Sandbox Code Playgroud)
我从源代码编译,没有任何额外的“配置”或“制作”参数。
在以前版本的 swi-prolog 中,我发现这工作得很随意。有时控制台会变得一团糟,我不得不按“.”。强制它终止当前行,然后历史记录将再次开始工作。
但是这个最新版本..nada..我使用的是ubuntu linux,bash shell。感觉像是操作系统环境问题,或者 swi-prolog 中的错误。箭头键/历史记录在 Linux 级别工作得很好。
这实际上并不是一个答案,更多的是一种解决方法,以防其他人遇到同样的问题。
虽然“向上/向下”箭头键在 6.0.0 中出现损坏(和 .1 - 刚刚尝试过),但“基于命令”的历史记录似乎可以正常工作,因此可以通过这种方式检索以前的命令。
例如。
3 ?- !!.
listing.
true.
4 ?- L='fred', integer(L).
false.
5 ?- !!.
L='fred', integer(L).
false.
6 ?- h.
1 listing.
2 listing.
3 listing.
4 L='fred', integer(L).
5 L='fred', integer(L).
6 ?- !3.
listing.
true.
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1336 次 |
最近记录: |