shared/shell: Fix short option parsing

The index value used for detecting and validating a short option
was not reset after processing a first short option.
This prevented the correct parsing of additional short options.
Fixed by resetting the index value back to original after each
iteration.
1 file changed