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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21091 invoked from network); 13 Mar 2023 20:32:21 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Mar 2023 20:32:21 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1678739541; b=kbShqZPDyga/I5n9upG0RIw5GW1cvL8WSqAulZg+Q8AsAFTOaUDhJBqnf61o26N916posIi/d9 xk/lq/jnSFN8MzLRnykJr13Dos2s7ESZTfWX/77RXn4rm0jcs6KvmYr2yq0fgjise9MbSuosin 6EUv8dpmlzUtuIdF13CR0XmyaAgaW/CloxP1cVPzvEuHRHCM5nnHNYbBCLqWJBIVnNLqxt6rXU 65JInTUGknIJ+pCi17w+hJ1g9CmpYRveZg4Y8BeTpAd6I2FbkeE7dkkQgpBJk2GzXrZurrZmbt BYkuZX7GdhgMHkBMRHVunlzA8bmbvachjScKXllxZdnGBg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f44.google.com) smtp.remote-ip=209.85.208.44; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 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-20210803; t=1678739541; bh=93E4LK8yA1QOsrAX9IRm3v70GXNI4hsbQtrFB/WM4E0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=i4vKL42mRsDgFbLxDMXSNV+O4+mgXfNRYu07H96K31QIVTICWv8lHmauY9Fs7/AwwMW4kOFAFN ZvtMSPZEMBQCXGT1RUbBz0ficShAWDi3/w67bp3HZXOBk0Y8+u3+e/CvV5+ebKgBKb2PeEje7K YI/wNj3bva6Ar5Ra0yFye8TBgB6/bJIIMH3Yimwuo/WZGmVNK/ejPu0WKUaHDbisYpn/h2dSrz ckGhiU9uSEYiBZYfLVfZfthjfeaKJVpBlJY39yNbVOhBGpTU3lJqAFweoP//6et5shHJdaXAdm wx7iPVRpXo3x+mATfkb6B8qJZ0jB2hg5Z2UMTsLKZxWHtg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=2cabXop8AlzDgq4MPp7eBCqjzBLHqsvMCrwcKafr3Zw=; b=qyyE1YSKtOM2lwI6Nb6wJejZFh wfj/LrMvmyTn9sCDsmJ/o97/y50e673zUA8oytfKjM/sthczH/WplfhZWYrhA9m867x9sVYuBrGj2 I0v5gCmIOnp9xMUin/ywZX6Sg0/mHk5dEqPEzsRmiQN/5C7W0xwBU3uyrf4GsfkUd0JLwAK5feI8b 4UQXX8F2dVYGp+exZOh8wJG02J+HxEtf+863p/f8Nek7jYq8DGBUV0rfz3QbR2GjklRVcjhJSUqpB I9XNXgXhPRcQThJ61P1hY4aQDioAN2w5MdFtknWZSRudupLMer1jgVMI8G2LzKGGrAUNRObV/TDyR lM0oBtpA==; Received: by zero.zsh.org with local id 1pboqC-000EvD-1n; Mon, 13 Mar 2023 20:32:20 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f44.google.com) smtp.remote-ip=209.85.208.44; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ed1-f44.google.com ([209.85.208.44]:43758) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pbope-000EdC-Cf; Mon, 13 Mar 2023 20:31:47 +0000 Received: by mail-ed1-f44.google.com with SMTP id x3so53705374edb.10 for ; Mon, 13 Mar 2023 13:31:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; t=1678739505; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=2cabXop8AlzDgq4MPp7eBCqjzBLHqsvMCrwcKafr3Zw=; b=i1bmhucwb3dkZ9e+NeJHN7u16lQnFhtsyb+MuXY/UQIUI9xHkX5tqbsLf7hwBLLekm ptzaVndQVvfVvGdlOE/4I+g+rMOGpgS/ani7CYUsegEyEmT4zh1GRAXJ8UeDu4k3Xfhb SH/NqNBzOtsvwUvf+3vCGhS0A+Ab0dtHut3Ql+PJcJAHfzKcMlQlpsvyOCYWlogD9s0q yZuSmqJvZciYqlCmFuYTgFdYZwlSAGtX9eJllVhoYZLQJPjn4WZuzGDYqvzkP3WN8kZs WzZ5fjp6/QhXJGkAbYDrwqskBDjESuuJBEW5gb0SERB4hud6Kmvr/RvSfP2Gk6HK/gRN MSFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678739505; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2cabXop8AlzDgq4MPp7eBCqjzBLHqsvMCrwcKafr3Zw=; b=1QLsdg5Zb/BWSnfcbVG0HGLavCTEJHjoINRtY4E/QWIjIqMuLPwtJ/8IV7hdCIrW03 WOnh4PmMgJQIj2Aj4VU4GMNt7faZlbcPbzaA0Ebbr3LM+6YWQLJSJo8pQ/tLKt38E0Re ccw/Hs1VPmdGoWeqCp72MkHDOxsms7h3JTDubNQTcSrE6Esty6ps4YwRlnIcrlhByO2l RKUJGo3+yctCAyt1AxbfLoWP4J0aC6LCGrFHktpZod0Q0+dsUNV7+lGRJJfq85wUz1z8 TfYGZT5/Vvfiag5+cKCVJhXGM4C2g6wQ/W9hxThiZr/PCbEAFR2cjoNsreiytjya8Fxt YS6A== X-Gm-Message-State: AO0yUKUDnUvRanGIYMKL/02e8ZF9EcPd265U27EnCwFTpRgAN3kGgq8X OjcIchX4mZ/Q/HdNNP6WlbZ3EvvhmXyDxwUF8Yj6dg== X-Google-Smtp-Source: AK7set/tktrZ0Fmcf1mux+fOJhAbWQjbTDWFPGHisnzwES25DY6kfRilTNUWzQUcjuD7FEQO7C6wuTKP4+uSD0eclNI= X-Received: by 2002:a17:906:af69:b0:922:ac47:1e22 with SMTP id os9-20020a170906af6900b00922ac471e22mr3464657ejb.12.1678739505330; Mon, 13 Mar 2023 13:31:45 -0700 (PDT) MIME-Version: 1.0 References: <1454747193.3405418.1678210315384@mail.virginmedia.com> In-Reply-To: From: Bart Schaefer Date: Mon, 13 Mar 2023 13:31:34 -0700 Message-ID: Subject: Re: How to fix run-help-* functions? To: Mikael Magnusson Cc: Michele Venturi , Peter Stephenson , zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51571 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 Mon, Mar 13, 2023 at 11:19=E2=80=AFAM Mikael Magnusson wrote: > > On 3/13/23, Bart Schaefer wrote: > > Question for the audience is whether we want to consider this a bug > > and make it possible to use run-help as a standalone function. > > It could/should at least output some diagnostic, because it is very > easy for an end-user (or very confused developer) to do this: > % git > % git > % run-help git > git is /usr/bin/git > run-help:shift:106: shift count must be <=3D $# A reasonable point. > Looking at the code for processcmd it seems to literally only insert > the string "run-help git" on the command line, so what exactly is this > preliminary setup? I can't find it. It does a push-line so that the run-help function can retrieve it with getln. See workers/49218 If there's no line pushed, the run-help function is going to push a blank one (with print -z) immediately after getln fails, so there's several things that need to (not) happen if the widget is not used.