delegated_shell now respects -r parameter for indicating rir