Clojure:'lein repl'历史grepping? [英] Clojure : 'lein repl' history grepping?

查看:142
本文介绍了Clojure:'lein repl'历史grepping?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常发现自己在bash执行这样的命令:

I often find myself executing commands like this at bash :

history | grep'find'

history | grep 'find'

例如,查找一个奇怪的find / xargs命令我可能已经运行。

For example to look up a fancy find / xargs command i might have ran.

我不知道---lein repl存储其历史数据在哪里?这将是很高兴知道,因为然后我可以写一个leingrep.sh脚本,只是grepp通过lein历史会话。

Im wondering --- where does the "lein repl" store its historical data ? It would be nice to know, because then I could write a leingrep.sh script, which simply grepped through the lein history session.

很明显,这是在磁盘上的某个地方,因为历史记录保留从一个repl到下一个。

It is obvious that this is on disk somewhere, since history is preserved from one repl to the next.

推荐答案

Lein正在使用readline(如果你已经安装)或jline(如果你不幸, )。我不会费心试图查找磁盘上的历史文件 - 只需按Ctrl-r,键入您的搜索文本,并继续按Ctrl-r直到找到您要找的任何。这是一个一般的readline功能,并将在任何readline应用程序(包括bash)。

Lein is using either readline (if you have it installed) or jline (if you are so unfortunate, I recommend installing readline). I wouldn't bother trying to look up the history file on disk - just press Ctrl-r, type in your search text, and keep hitting Ctrl-r until you find whatever you were looking for. This is a general readline feature, and will work in any readline app (including bash).

这篇关于Clojure:'lein repl'历史grepping?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆