File: color

package info (click to toggle)
ruby-tty-command 0.10.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 452 kB
  • sloc: ruby: 1,990; makefile: 4; sh: 4
file content (8 lines) | stat: -rwxr-xr-x 131 bytes parent folder | download
1
2
3
4
5
6
7
8
#!/usr/bin/env ruby
# frozen_string_literal: true

out = "colored"
if $stdout.tty?
  out = "\e[32m#{out}\e[0m"
end
puts "#{out}\n"