shell: make ShellGrab more convenient to use in a C++ fashion