也许这是一个新手问题,如果是的话请见谅!
在REPL中是否可以将我输入的所有行保存到文件中?也许可以在关闭REPL会话之前配置它来实现这一点。
感谢您的回答!
在REPL中是否可以将我输入的所有行保存到文件中?也许可以在关闭REPL会话之前配置它来实现这一点。
感谢您的回答!
tee
。请参见以下内容:$ lein repl | tee repl-output.txt
nREPL server started on port 52576 on host 127.0.0.1 - nrepl://127.0.0.1:52576
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.8.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_66-b17
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
user=> (+ 1 2)
3
user=> (println "Hello, world!")
Hello, world!
nil
user=> Bye for now!
之后:
$ cat repl-output.txt
nREPL server started on port 52576 on host 127.0.0.1 - nrepl://127.0.0.1:52576
Clojure 1.8.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_66-b17
...
...