So I managed to get console colors working for Facter that works in both Windows & Unix (using ANSI escapes):
https://github.com/puppetlabs/facter/pull/187/files#diff-12 The pattern is to use something like: t = Facter::Util::Text.new t.color_print(:magenta, "Stuff I want in magenta") I'm not sure if this is a good API people would desire to use, so I'm asking for comment here. I've also overloaded the color argument with color scheme settings ... so: t.color_print(:strings, "This is a string") Will map to the color we determined for a 'string' in the output. This way its easier to change color schemes in 1 place across the application. ken. -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
