code: def do_zsh_complete(cli, prog_name):
      
      commandline = os.environ['COMMANDLINE']
      args = split_args(commandline)[1:]
      if args and not commandline.endswith(' '):
          incomplete = args[-1]
          args = args[:-1]
      else:
          incomplete = ''
  
      def escape(s):
          return s.replace('"', '""').replace("'", "''").replace('$', '\\$').replace('`', '\\`')
      res = []
      for item, help in get_choices(cli, prog_name, args, incomplete):
          if help:
              res.append(r'"%s"\:"%s"' % (escape(item), escape(help)))
          else:
              res.append('"%s"' % escape(item))
      if res:
          echo("_arguments '*: :((%s))'" % '\n'.join(res))
      else:
          echo("_files")
  
      return True
docs: Do the zsh completion
  
      Parameters
      ----------
      cli : click.Command
          The main click Command of the program
      prog_name : str
          The program name on the command line
  
      Returns
      -------
      bool
          True if the completion was successful, False otherwise