Can I clean the repl?

后端 未结 8 1872
被撕碎了的回忆
被撕碎了的回忆 2020-12-23 13:50

I have played with a lot of code in a repl console, how can I clear it? I would like a fresh one without restarting it. Can that be done?

相关标签:
8条回答
  • 2020-12-23 14:27

    It depends what you mean by 'clean'. To remove all namespaces within a 'package' you can use:

    (mapv remove-ns 
      (map symbol 
        (filter #(.startsWith % "org.mycompany") 
          (map str (all-ns)))))
    
    0 讨论(0)
  • 2020-12-23 14:30

    In EMACS/slime REPLs C-c C-o clears the last output (in case you've typed something that gave a very long answer) C-c M-o clears the whole thing

    In GNOME terminals, you've got a menu option Terminal/Reset and Clear

    0 讨论(0)
提交回复
热议问题