shared/shell: Fix parsing of mandatory arguments

In certain cases the arguments may no start with the mandatory commands
such as when the command handler expects getopt arguments first.
1 file changed