def build_sh_cmd(cmd, cwd=None):
args = cmd.split()<EOL>return getattr(sh, args[<NUM_LIT:0>]).bake(_cwd=cwd, *args[<NUM_LIT:1>:])<EOL>
Build a `sh.Command` from a string.

    :param cmd: String with the command to convert.
    :param cwd: Optional path to use as working directory.
    :return: `sh.Command`