add detach() option to Cmd, fixes #1960
also fix #2846