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 19116 invoked from network); 3 Jun 2021 23:33:50 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 3 Jun 2021 23:33:50 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1622763230; b=zl1UDOc6aI/AIH0RlZhUrczd1HzKdp7OeEUuWCmsU/UGBMocDTZ6dwlCTgxJayM/bxP+4UCYY2 0xNJ98m4JLVaZZZ1pNX/INHPgrpn9adQD3P/GrxPbnjzCVOnH/ryOT76svvzx5CVmCLqvzitAf ioUqgO0Yr+tB0RTp2a0qL8PO9eVRr5Uy2AknNUwHc6hB3LplGKrogCI9qpcpcpw5aAbde/Pu1n he7lmiJPnlVxghddUwF612Eyic4LZLfgxIsg7TthyWtv6i0zYbGRAsBjuKmBuKZjMhetE+PfYO ZsqVsLfpkAdkYw6tbrJxNdEvXarO4e9XkrilqY+cPzGcFg==; 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=1622763230; bh=bWl+8q/zfEpiSXu2nD6yZhUcDunr4XEy95FVfU177UY=; 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=gp2hIuYuLZfJQvkHI+3plWV9+M7Dc1wxuP4E1UQqZBpPhnzmHA1f2bURNhr12SNati+KcTLNNW zin+oabeIyai691Q+3lifimcPJwluLM8KaXYojbBCCXnswacB+VfgutQMgPYG4QZQU2UfwqEsY P8ZcvhGgqj2M7qOft5/5+RBxT3oU4c/qoNkj4h2PrCRvl1egRmysZxWuADRDnUbXCn8KhAbayM qjFEwCLC1Lj+yzgkmz4BxYSu1pmn84Sx+jfpzZ5EmO2rI7EaCoxcdyMcLUNTCb2Mxast5oPjU6 QF1OVmJpk0d4rfyrchP20tS8qmCtW8S13IRUb4bDkABR8g==; 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=K6rcvhXxzecAIVJFtO7CpZMiNH6E6IOrVQVqVQOZTYE=; b=mLN6D6x9ARgy1l4nUx4WczJb5R GL2To524dENecS5vDFh1PSRrMpTvR5PAF2PhilU53s8Pn7MS9rx8PdHQQ3kfdMh+pdLkgfPuWE91l fCZKSTve5NHBWYed0FrUy4xjtkiw4vKUWIaqgBkIAweZcqMHCuGo8Oe6CUWkY2PX2YPjy5doIZ2Pb CdffWElr5HFH0SyIt/jHnFBvB9BuMS7UbREme8E3u0l23WwlE65Tgf8/preh9HcdyoIqwX+6seRf0 HJew0Jfk6mk34AAFuKE63Bf/skU4DiPuajcNRhTCGUNMiIscgDeOHEkmwy0wMM5j9NKxT9Xn4lbI5 b3MGr0Mw==; Received: from authenticated user by zero.zsh.org with local id 1lowqS-000C27-W0; Thu, 03 Jun 2021 23:33:49 +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]:41819) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lowpw-000BiS-SI; Thu, 03 Jun 2021 23:33:17 +0000 Received: by mail-oi1-f173.google.com with SMTP id c3so7989710oic.8 for ; Thu, 03 Jun 2021 16:33:16 -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=K6rcvhXxzecAIVJFtO7CpZMiNH6E6IOrVQVqVQOZTYE=; b=w6+2tlecbnWMowJLtj/2nUmXSoCVOKX5Q/zt1dB3iHIjlaR1+O1GcnHOpTA93kNzJn qn5qpMjtDlhVymLLdtg4g3uT5WpC+2/ZlvvdvvUNOaqE0O8aVAOc85E1IfNd+mN4seA7 GrA4nlXaPpiHLAbg8OOGn8onJaB1QvjImAWpVuSKMSPCDqk5wIFvGlndHBNuSgzFp2Rw EbprsNpgZhxkihx1JSXYt4z5J9gKHiIGARHdCBA5cBGFsTnd3XFIKsWYATczOu9+7X7M P76x/Od61sCzg7WY+5MtzIquUyVfiam0bCPTk9s33utJKjKzZ1eFFF4TYEP1O4jx4JzR QS+Q== 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=K6rcvhXxzecAIVJFtO7CpZMiNH6E6IOrVQVqVQOZTYE=; b=PHaEcZTlvldLGyio9H/PVC5Tnlia9uKswT/Z6J1Yl6uQ4uSaTj117Q6PMnDen+pljh yCD2gmG7U/BPIcU4JwE6N7gOCohbOkIDwfswRGgE0N1HQrEO2hY/NaS28WFPj0SlYDeF ynHi1MHewKzJNZeQOzGfKL/FMa63TkTgIfoiXi7vEBwxcXZxGmAOGr1kj8lHsBfULGKd au07YgQ3oE//CbpYdxpzQRbnvYSAEVJV2H9x5tK4H7PpmZMDwS9YtGUXhu2b5KTndzgk uEAscyfqhF026JIR2kTqqqF4LHvvUHrHrpw7i7ihBeyyfNlPFUqamSLd4GdcqBjPmOn9 lWow== X-Gm-Message-State: AOAM533yh9mtTRZTpj8typmuXjdDCR2vTHt13d4PJhBKsmV4txXc4A6V sxWb77yLPjV2cJqHFBBbRaAS+zS8C5g9OFA3ia6KDA== X-Google-Smtp-Source: ABdhPJy5jf02LziITsQ1i9QC0sWkK5+GMugGF3KdYHn8gX6l2nirzYrIcpmzOpQ6xzcVNAnXlVQKjughkrHPz4yYWUo= X-Received: by 2002:aca:d658:: with SMTP id n85mr1145932oig.84.1622763195671; Thu, 03 Jun 2021 16:33:15 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Thu, 3 Jun 2021 16:33:04 -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: 49011 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 Thu, Jun 3, 2021 at 2:27 PM Marlon Richert wrote: > > On Thu, Jun 3, 2021 at 7:34 AM Bart Schaefer wrote: > > Stupid example, but: > > > > % ssh -- localhost date > > > > Without the patch, run-help displays help for the "date" command. > > With it, help for "ssh". > > That's weird. For me, it gets help for 'ssh', both before and after > the patch (on commit bd328a2). As mentioned elsewhere, you do have to manually load run-help-ssh into your test shell, it is not an autoloadable file. > My patch actually fixes an annoying case with 'run-help git'. Try > pressing ^[h on, for example, 'git -C /path/to/zsh log'. This works for me, with or without your patch, using the git completion in the current repository head. Are you sure you're loading functions from the right path? > Anyway, here's a new version of my patch. Let me know what you think. I don't see any obvious problems with it but I don't know how to construct a test case for any of the helpers you've edited. It would be nice to know that this does not break the un-edited versions of those helpers, because if those changes are required rather than just redundant code removal, other helpers in the wild would also require editing.