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.
我希望能够在 shell 中获得 Ruby(或 C# 或 F#)的颜色。
wirble 用 IRB 做得很好,但我希望能够做到:
> cat rakefile.rb | colorize
有人知道我该怎么做吗?我知道 github 的语言解析器是 OSS - 它们可以用来逐行读取并着色吗?
pygments 为您做到这一点:http: //pygments.org/docs/cmdline/
你也可以试试source-highlight。
source-highlight