Do not dump all commands when the minimal common string is empty.
Cosmetic: fix indentation.
Comment.
When no command is inserted by the user, we must avoid to print an error message on 'return'.