如何劫持 swi CLI 并对其进行自定义?

问题描述

我想重用 swi CLI 界面 .. 而不是

1. wait for user to type a line ... plain string
 1.1 if it starts with ! execute it as normal prolog,goto 1  
2. split by space and make a List of atoms or "word-strings"
 - may be cleanup punctuation
3. Pass the List to a clause for processing
4. goto 1

我想保留历史记录功能

附注> 我得到了一个使用 get0() 的解决方案,但它看起来很复杂,而且没有历史记录。

在python中我使用:https://python-prompt-toolkit.readthedocs.io/en/stable/index.html 它具有更多功能,但对于初学者来说,至少保留历史记录和访问权限是可以的。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)