                 helpMessage: "Show SMC keys when printing temperature sensors.")
 let CLIWarnFlag        = BoolOption(shortFlag: "w", longFlag: "warn",
                                     helpMessage: "Show warnings for stats.")
+let CLIColorFlag       = BoolOption(shortFlag: "c", longFlag: "color",
+                                    helpMessage: "Use color for output.")
 let CLIFanNumberFlag   = IntOption(shortFlag: "n", longFlag: "fan-number",
                   required: false, helpMessage: "The number of the fan to set.")
 let CLIFanSpeedFlag    = IntOption(shortFlag: "s", longFlag: "fan-speed",

}

let isSetNonBoolOptions = CLIOptions.filter({ $0.isSet == true &&
                                              $0 as? BoolOption == nil})
let isSetBoolOptions = CLIOptions.filter({ $0 as? BoolOption != nil })
                                 .map({$0 as! BoolOption})
                                 .filter({ $0.value == true})

//------------------------------------------------------------------------------
// MARK: FUNCTIONS
//------------------------------------------------------------------------------

func warningLevel(value: Double, maxValue: Double) -> String {
    let percentage = value / maxValue

    switch percentage {
        case 0...0.45:
            return "Normal"
        case 0.45...0.75:
            return "Danger"
        default:
            return "Crisis"
    }
}


// FIXME: This is bad, need a better way. Need changes in CommandLine lib
if Process.arguments.count == 1 ||
   (isSetNonBoolOptions.count == 0 &&
    isSetBoolOptions.filter({ switch $0.shortFlag {
                                  case "c", "d", "w": return true
                                  default           : return false
                              }}).count == isSetBoolOptions.count) {
    printAll()
}

