Strip lead/trail whitespace in non-escape commands.