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 22257 invoked from network); 13 Mar 2023 20:41:34 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Mar 2023 20:41:34 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1678740094; b=mnvMMw8AZLyhDINgAb7vzYZLa5R2SQASYJQpDCzJQC/YhiEz6IJHB4nalp+G6VHUpmXH/KpngD koe3Bsy/uYSUeJ7rAg5VDXyYAIeO4QgXTYEVBWH3xZD4tFP7UozAmZqqBpUZKQ0Qqa2zq30NlZ NmaUntU1u/pt8erPI58yII38TcX+7zbU4hooHtEZA7adTsa3tvFO/SpaxxdQtBuLVF4F4qGT0N v9mu87OPluZvfcVwQCEnXpfMdUWemmC8YSItZZMD7KNeJws5nD5JDrudZBK7rDpmVCmAcESTBL LAm/SWL2XBog00iRtCwDt/2EnC//ifAmJl4I3OkHf0wf2Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f47.google.com) smtp.remote-ip=209.85.208.47; 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=1678740094; bh=aVcotJLotNgKEUEns7uLP51Edj2xa4HNoT4LvvIKj0g=; 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=RFD2WVM1IuMAqLpotn6ovCa+EJ2GIg7pe3vz5RcJxuddcFA/UBjKu9oVqw+9lep2vxG80Vq222 kCNaur+olSLQWgPMucxjHWOHUUmSSaG4ITZ1z1gxgdYFu3aBJGF20LUPMPcBN1Yz6kINOengZ6 0/pRyGYNNpl62MJsZjlo0WZJK3/7srrSVe76WqQqdBYaI+RXShqWs/voKQX6hLLUKXq3w1qCMj EZor3/SDUJuFUOgRyVWGic1Ry/lqjaLyQ/m1vpMnNTC09veJwWPaULIEo5il9kBQ5eUXeLqDQe /Kw4UOq47AKzO4UE56aLNIZ9frL9E2v36LNYsK4/8I+MKA==; 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=WGBmsC4Dd+8A1U8q8Qq4kfRkloaWJ3Yav+oT1eablC4=; b=Q5KmjVxIzmcxs90qoeqiEnvJQX aBnKQh7LWTQD8J3W1dcRd63mE3eqsMStNpDboiZ0xJn6M2cOvwFV47Sw77j9BvqmIICIRlV67Idqk ZfvbIDHItpHOTLWKzjTDy4xYEXhuB0R8C5HLSgkSZ8SWqwTTtaIwdU7hOfJ/KfyEArBcOdXNH4fSh qX5kflv8BllRTFnkY96vjCIkXPI4PbS/bMzAoQuCBHrkLZeBuypJZFqghd6Io9Cl/lGsxaeK7BvhD 6IwR+OPoe5bZNs5SqJrHUHe8y5OauD2bxylhyOOeXi/AdDWU/w747NcGH0sI1MnUFapnDMmlVMtYu T3gf0LcA==; Received: by zero.zsh.org with local id 1pboz7-000FlU-SD; Mon, 13 Mar 2023 20:41:33 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f47.google.com) smtp.remote-ip=209.85.208.47; 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-f47.google.com ([209.85.208.47]:46074) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pboyq-000FSd-Qp; Mon, 13 Mar 2023 20:41:17 +0000 Received: by mail-ed1-f47.google.com with SMTP id cy23so53754962edb.12 for ; Mon, 13 Mar 2023 13:41:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; t=1678740076; 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=WGBmsC4Dd+8A1U8q8Qq4kfRkloaWJ3Yav+oT1eablC4=; b=XuqoZRm5R8Le4pwRnQWanmiuiumjxaWRxOo+X4J1cdVms3gdayk28md5qOB/i0ykv5 jTE24tZMnm4SjL+A+VzMwxUdv0V2C0QuYCvq75nv0XZN/Hu4VamrmxL4Kd1oGlmFCckD BvnF7hw9b6TjAioRV2v3VWa/iFhScwU2+xj0WIVvVZdIzhUgjjL1zsOAwef/X8dbxHCc dH9I5aRHTXhutkq4MXROmeVgsw0YrDkRiZgj/PSfUXpvR8sARMeuPGYqh1KooseAVwwf SASIl/HU54hUTrLvOWAQGttnatihhZuvpra2S6bg7dtzBnwVp3a4rxyVyGG4R+Z5R0BF 9GqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678740076; 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=WGBmsC4Dd+8A1U8q8Qq4kfRkloaWJ3Yav+oT1eablC4=; b=20C5BkhDMWPFpfDwE/iljsm2c8BV7OVOwli+XRpDxgxPJhA8baoWymGNv8GlkCcoLP 8ZYq6NuAppr2lQB0wiDctFrH1e90RbGxLlSwUKafTUoXwnOZD8nGPzz7PS71FvLVIa1l qK6wqZyoAR+xGyjN3qLzwcWw5ziF07/WZA8i5Upb20pO6gqLFu7lJZUOJhXsIBbQlQB1 YGwHBLpqp22n7KknldCeypzRQ1Otn00mvS125RlXGas+hK9W+DY2eUzkG1et311Ujedw henxcG7XMA94fGDk693a0974rP7olsklqf3U6ZmI5a362DsJUAHVBib6/84lV+WgMkTf /ZKg== X-Gm-Message-State: AO0yUKXmqwEPjkZsgHRS1kPT8FsBD8q1bYe5JRd9kUstsrWH/6ZdW6Fr VBGmp9GWbdEgNwL5PGLpqrnShSSlHC0iM2JSlPR73Q== X-Google-Smtp-Source: AK7set/NcA9CdEiMpCHMj9izfwS6P7C4QrLjkhO5FItgHHuyUD4kaNvxjFNau4+OId7GHvjv3Ezwv1R4ugcdxtON4+U= X-Received: by 2002:a50:8704:0:b0:4fa:794a:c0cc with SMTP id i4-20020a508704000000b004fa794ac0ccmr4214912edb.2.1678740076091; Mon, 13 Mar 2023 13:41:16 -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:41:04 -0700 Message-ID: Subject: Re: How to fix run-help-* functions? To: Mikael Magnusson , Michele Venturi Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51572 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 1:31=E2=80=AFPM Bart Schaefer wrote: > > 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. This seems to cover it: diff --git a/Functions/Misc/run-help b/Functions/Misc/run-help index d52c1b032..0bf84447a 100644 --- a/Functions/Misc/run-help +++ b/Functions/Misc/run-help @@ -98,9 +98,9 @@ do if whence "run-help-$1:t" >/dev/null then local cmd_args - builtin getln cmd_args + builtin getln cmd_args && builtin print -z "$cmd_args" - cmd_args=3D( ${(z)cmd_args} ) + cmd_args=3D( ${(z)${cmd_args:-"$*"}} ) # Discard the command itself & everything before it. shift $cmd_args[(i)${run_help_orig_cmd:-$1}] cmd_args ||