Disable JShell history

别来无恙 提交于 2019-12-14 03:45:39

问题


JShell by default enables a persistent history of everything typed, which can be recalled by pressing the up arrow.

Where is the setting to turn this ❝feature❞ off?

Also, how do I even clear the current history? Maybe I'm dumb but I can't figure out the command. /reset seems to do nothing.


回答1:


Also, how do I even clear the current history?

What I'm proposing is clearly a hack but it seems to be working, at least in Windows 10 with JDK11.0.4:

Run Registry Editor and search for the '/J/Shell' key. Once found (under HKCU and HKUsers), delete all /H/I/S/T/O/R/Y_/L/I/N/E_ values under HKUsers. That fixed it for me; so far, the darn thing works, nothing looks broken...



来源:https://stackoverflow.com/questions/52805603/disable-jshell-history

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!