MCPcopy Create free account
hub / github.com/duckdb/duckdb / SetHighlightingColor

Function SetHighlightingColor

tools/shell/shell_metadata_command.cpp:577–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575
576template <DeprecatedHighlightColors T>
577MetadataResult SetHighlightingColor(ShellState &state, const vector<string> &args) {
578 string literal;
579 switch (T) {
580 case DeprecatedHighlightColors::COMMENT:
581 literal = "comment";
582 break;
583 case DeprecatedHighlightColors::CONSTANT:
584 literal = "constant";
585 break;
586 case DeprecatedHighlightColors::KEYWORD:
587 literal = "keyword";
588 break;
589 case DeprecatedHighlightColors::ERROR:
590 literal = "error";
591 break;
592 case DeprecatedHighlightColors::CONT:
593 literal = "cont";
594 break;
595 case DeprecatedHighlightColors::CONT_SEL:
596 literal = "cont_sel";
597 break;
598 default:
599 throw std::runtime_error("eek");
600 }
601 state.PrintF(PrintOutput::STDERR,
602 "WARNING: .%s [COLOR] will be removed in a future release, use .render_color %s %s instead\n",
603 literal.c_str(), literal.c_str(), args[1].c_str());
604 return TrySetHighlightColor(state, literal, args[1]);
605}
606
607#endif
608

Callers

nothing calls this directly

Calls 3

TrySetHighlightColorFunction · 0.85
c_strMethod · 0.80
PrintFMethod · 0.45

Tested by

no test coverage detected