code: def register_share_command(self, share_func):
          
          description = "Share a project with another user with specified  permissions. " \
                        "Sends the other user an email message via D4S2 service. " \
                        "If not specified this command gives user download permissions."
          share_parser = self.subparsers.add_parser('share', description=description)
          add_project_name_or_id_arg(share_parser)
          user_or_email = share_parser.add_mutually_exclusive_group(required=True)
          add_user_arg(user_or_email)
          add_email_arg(user_or_email)
          _add_auth_role_arg(share_parser, default_permissions='file_downloader')
          _add_resend_arg(share_parser, "Resend share")
          _add_message_file(share_parser, "Filename containing a message to be sent with the share. "
                                          "Pass - to read from stdin.")
          share_parser.set_defaults(func=share_func)
docs: Add 'share' command for adding view only project permissions and sending email via another service.
          :param share_func: function to run when user choses this option