updated rshell.cpp to deal with empty input