From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22476 invoked from network); 3 Jun 2021 04:35:11 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 3 Jun 2021 04:35:11 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1622694911; b=BNMskleYrCL7PCu/bnz/ez0PUssJmb8rtlMrpPPhPmWQpO6gySF8awMSfwX9YwuqnAHiEzqqpp 1XPgQ0FvsvON+p49YYoimd0DvsgTt41Mwe6Itd4MMEkQAQiulpttQjgMp0V+E+xjt8Sge+wKPK 238ufjenwJIweerBmPVz2ngcVh27p7hRwmo0uiZDxWiCQNdiR+/B3HT+FCgMaESSqX8cBRrQQe Yz1WrVCN0UcA5ELOgmat8Ih2jEK0IVMMlQ5/qlXtP6PQSbsliHy2tXnyxsoYTjPUp4qgktxy7K ExyYEJa0weOtb+3Tr5G+ifieAYuuvYSugFS5t8JJssET2A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f173.google.com) smtp.remote-ip=209.85.167.173; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1622694911; bh=lH4STmfgyl7DUu0DqJkWewb9mXIpM3MZ+xXfdsMk/yc=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=FWyCXMihpurZDU2hbfqr6OfFa1Z2Sesxp69UP8oXdPENeVxaFduUEqUsrxaMJ6+RFDQXJ1e16l WJUMQnxaXHRsnKEEXZ/zYtfBW6gIqv66vK4INx9cR9mEZ3OuFBMhb8Wka+Fg4QNLrmumBg5fGU XxW6/8smhXk0zg05jPD4B/sjpto+9n6HRNlzB+x4bJV6GbeTSfZ1fYxviiRUvYRCbj3uNCW0aN xKhGiiEFuEfXckOvcd6EyQLIt42RpGa0fArOc+rSM5/sTVh/nbRpGDOdhE283a5OXm+yg0uROB 4vfSjiGyRUz59hhkaJtkJ3t73+rout2OlXIAiymNp+jxqw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=hv3on2c16yHdCVP5M22lcxNsvr87Pz/ii588skpKQ9c=; b=Z05l8Na+/bgpLQdxGmEA+Cz2qn 6JnALeVUV97lbtv0fDzQ4/Eig30bmHN4PH3P5aOZzGWJoU+DmVT556mh344xw5AVHQiiu//B3XtJj TkRxlHlNOHGe2QAiflUooC81lsgTft/38rZabLGudv1Tyvxpf5CYS7mnk8Q609wB3bXjeGDEPyirU /H27r3u0ic36CRrdxtVvO7vjtBZoqh9T5ElU4jZ3lESzVIcpa0BKNcjVvMgel3l0Lr03ShTq+PQU5 38deNrq2tdXmQgDT42QYAmlMq8TUcxJsZ1pgCzm37fFT7KDtoEyOfJgKd9AsGqR4iLOLNaAaBGGPz jXsitEAg==; Received: from authenticated user by zero.zsh.org with local id 1lof4Y-0008IC-F9; Thu, 03 Jun 2021 04:35:10 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f173.google.com) smtp.remote-ip=209.85.167.173; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oi1-f173.google.com ([209.85.167.173]:38886) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lof4I-00080J-DC; Thu, 03 Jun 2021 04:34:55 +0000 Received: by mail-oi1-f173.google.com with SMTP id z3so5055528oib.5 for ; Wed, 02 Jun 2021 21:34:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hv3on2c16yHdCVP5M22lcxNsvr87Pz/ii588skpKQ9c=; b=ll8M1dPitsdOs/qnrYZf1XVgUSD/uil7KdhZkACc3DtOf8ppI8QDd+78t8QQgyp+KD 0AM9SzYetsJ/3wGbrEf5HvQFQDIb5Ar8FXcjzJbuACGHqENW8FNZacd23bLFgUjggmCL LFIOQTIX48hKa7xnd1/ZdeVuaVzYNAXgRohePzr/WpNNt9hsuv8q9Ac/axzLpJg/gfAk 605x6bKCPi+v0HKRZ0SAa9yl5fSy7lOHv0wC49wkNjpCvJ01fnxX7iyAlSV+6JyzIl6I /QSQ2lzM2S3tzcc8vUHx4GHlcbGT6NZVSICYmMg4pRRoN7+PWsDQHnGT7oy+vw65VJAg N9Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hv3on2c16yHdCVP5M22lcxNsvr87Pz/ii588skpKQ9c=; b=cV1GJtBn+GOummPhlri9ZjgUgacoVrynHTUWO0jPpgJZ7llXJVa77PxH+Na5bXuxmn Eu0a2PAO4F5i0q+4BdZveO3+GlDXqQAcIiABZrNZrWEA+aK/TdyK7jiOmMzohq9QQnHg t0eGQJ9mZ/A3dgd+Gi5vwgiXZEJsW7/a6JWgiN0EGDKjUx8KxK0ypQpwLDGvCoJuNeYg AgeKdgjl0SdH8ilZaFUkJKLUY9aBHgphdmLi16WIseAexND9qz5a0YapkJaAisRohKty 7WI7dYtIdQsZoEkM4rdOrlllKZ0Frnf4JPWBsZjfZHjV8KXxaR3WjSxwcUXlDibJMG58 5IpQ== X-Gm-Message-State: AOAM531ENCnilVeQR4E7ashPL0HAJRhxwM5a20Yo2S+qmaV9314N+uqv UbYRom34bv5QOig6NyIwq3CmqvYz6oxdP1Rpf7GljA== X-Google-Smtp-Source: ABdhPJyFRHMiNqwb2jI8ru9NmvBqEaolVLIG4xPRoCxe8Avi5yswDehd2GxFEwGDDQk+hqe2Co1ZgV4qu51GPFQ/1X8= X-Received: by 2002:aca:5cc2:: with SMTP id q185mr6272431oib.173.1622694893158; Wed, 02 Jun 2021 21:34:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Wed, 2 Jun 2021 21:34:42 -0700 Message-ID: Subject: Re: Let run-help filter cmd_args before calling run-help- (was Re: [RFC][PATCH] Try calling command with help flags in run-help) To: Marlon Richert Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 48995 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Wed, Jun 2, 2021 at 1:58 PM Marlon Richert wrote: > > And here's another part of workers 48926 as a separate patch. run-help:115: parse error near `]' Typo? + shift -p (( $#cmd_args + 1 - cmd_args[(i)(-|--|;)] )) cmd_args This change also breaks the run-help-ssh example in the documentation, and does so in a way I think it's impossible to fix. Stupid example, but: % ssh -- localhost date Without the patch, run-help displays help for the "date" command. With it, help for "ssh". It would not surprise me to find that attempting to generically parse arguments in run-help would also break helpers for commands like "su" and "sudo", some commands that have git-style sub-commands, or .