cli/trivial: move code
These helper function will be needed in the next commit to be earlier. Helper functions like these, that operate solely on trival types (in this case, converting an enum to a string), make generally sense to have at the beginning of the source file. Because they themself have few/no dependencies and are rather trivial and self contained.
Showing with 76 additions and 74 deletions