| 179 | } |
| 180 | |
| 181 | MetadataResult SetHighlightColors(ShellState &state, const vector<string> &args) { |
| 182 | if (args.size() < 3 || args.size() > 4) { |
| 183 | return MetadataResult::PRINT_USAGE; |
| 184 | } |
| 185 | ShellHighlight highlighter(state); |
| 186 | if (!highlighter.SetColor(args[1].c_str(), args[2].c_str(), args.size() == 3 ? nullptr : args[3].c_str())) { |
| 187 | return MetadataResult::FAIL; |
| 188 | } |
| 189 | return MetadataResult::SUCCESS; |
| 190 | } |
| 191 | |
| 192 | MetadataResult ToggleHighlighErrors(ShellState &state, const vector<string> &args) { |
| 193 | state.highlight_errors = state.StringToBool(args[1]) ? OptionType::ON : OptionType::OFF; |
no test coverage detected