code: def _get_activate_script(cmd, venv):
      
      # Suffix and source command for other shells.
      # Support for fish shell.
      if "fish" in cmd:
          suffix = ".fish"
          command = "source"
      # Support for csh shell.
      elif "csh" in cmd:
          suffix = ".csh"
          command = "source"
      else:
          suffix = ""
          command = "."
      # Escape any spaces located within the virtualenv path to allow
      # for proper activation.
      venv_location = str(venv).replace(" ", r"\ ")
      # The leading space can make history cleaner in some shells.
      return " {2} {0}/bin/activate{1}".format(venv_location, suffix, command)
docs: Returns the string to activate a virtualenv.
  
      This is POSIX-only at the moment since the compat (pexpect-based) shell
      does not work elsewhere anyway.