Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何编写一个ruby程序来实现一个可以在终端本身运行的文本编辑器。在文本编辑器中要执行的操作是
那么文本应该以该颜色显示...
听起来它需要不止几行代码:p
但是,如果您担心更改 shell 内的文本颜色,我将从标准库中的 Curses 实现开始:
http://www.ruby-doc.org/stdlib-2.0.0/libdoc/curses/rdoc/Curses.html