Fix -Wchar-subscripts warning in shell.c