[PATCH 09/36] cli: Create a function to process characters