ConfD User Community

Use color code in cAbortedPrefix and variants

I want to show color code in the “Aborted:” tag displayed in CLI in case of invalid commit so that they standout. Has anyone been able to achieve something like this?

Currently it throws error

# confdConfig cli cAbortedPrefix "\e[0;31mAborted:\e[0m"
syntax error: "Aborted:" is an invalid value.


cAbortedPrefix and similar confdConfig values are declared as a YANG string, so they can contain only printable characters. If you need to customize error messages beyond what confdConfig allows, you may have better luck with the error formatting callback (though I’m not sure it would allow you to include ANSI color escape sequences either). See the confd_lib_dp manual/documentation page and the dp/error_formatting example bundled with ConfD.