shared/shell: Fix not reseting optind

Not reseting optind may crash the tool if getopt and variants are
called a second time.
diff --git a/src/shared/shell.c b/src/shared/shell.c
index b57ae1b..5e9e5ea 100644
--- a/src/shared/shell.c
+++ b/src/shared/shell.c
@@ -829,6 +829,7 @@
 
 	data.argc = argc - optind;
 	data.argv = argv + optind;
+	optind = 0;
 	data.mode = (data.argc > 0);
 
 	if (data.mode)