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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15388 invoked from network); 20 Mar 2023 14:38:11 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 20 Mar 2023 14:38:11 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1679323091; b=UanvF//oHfDTKnjpxCrNKsqUa0HeshLHvQGcOpEiEJVBp9dv/tLS3ump9uDXK88JaN/yaEoeag UOsaKHEM+Px89F+aIE8DM6W/p9gTSoZDa/N3iIcHico2C0+lxsx47XRlZRXmnFVoM+ne0dpNcO ED/CxikUrGvvJLl03C8LxzenJ1H87P0lxihEkyObb+o6+9d+t+5rXolo6I3I66sm4wlHvTijRB k8KWOVVdFyWbhys/1yHb3PMDcu67fiZyGkzmlkb1Im+1zWAP2coRf8LqRy3J0blXj9jxT6SkI9 gIEm0YsFij3R4ktx8deh63oM8ns3blRV6eGzXLglkJDJKg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-pj1-f50.google.com) smtp.remote-ip=209.85.216.50; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1679323091; bh=nduhCvTPqIt9R3IBW5U5heka9gA0Fy9Ytg1Uq5FkC7A=; 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=NBV8dGUNkxEeTUVW7MJdyk1cN7RyNFo8bK1Yl4I1fcqjCY8tIR4A/iF6mmt5o7x7Nhmv2UNcLd JMZxYp+T0syPcP8hHLgP04Yc+QawXHlqmxuGPus3CD2kYeWhcpWtKzzWHo9wztfGVGICBFe6JC kCHbXMMH9mx8+uFOJsbxxt/kas9Cnp9zuqcuA5d0xsSRfM0m2UKp8rPpln5yvrvzuDopi3uBoQ XKW2wext+W8pUX28RBEyT9iqasXCrzNkF6VfaSvImOde8MvAQNHK8f2gywU8uN8v/DFQvXt9Fv N4E092l2XxMcoAoA153nPMhGK9ELp1HmAp2UfGwugXK0OQ==; 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-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=ZS+kStoiDPfNtKY5Xdj+EjvPct3eg8pWySZg9sv0htE=; b=Q3T6ZTZqaYV5wEOQVzW9hyIAPH TtHY9HDG6zeMdYvw4K0p8Cs//dsrqXXIJL7lKo4RVw5GTiMGBA94Y/BznIJGnGUT4XJrG/pB+2rGX Fiv3zDXOMgkxw/VUk8OkCXvHtPa99e8S6fV0rRgbfXtqnznfej5kusOdnSxphGEVqDms2dnYykUHe pa8GMecm3zD07VJLFXIqJMLbGgRc6OOgX/mwqlNSXja1E0/kUSQqHqMfLCtFOBfUfg0ggZy3e5En0 HfatW6xUQw8arpM6SeTzuvtkNqPdywRwTRSnussd3xDwmoxUr/WzoMbzyULp9gd4RQjf/omDPvKTk GU6Re2/w==; Received: by zero.zsh.org with local id 1peGeI-000Epn-5Z; Mon, 20 Mar 2023 14:38:10 +0000 Authentication-Results: zsh.org; iprev=pass (mail-pj1-f50.google.com) smtp.remote-ip=209.85.216.50; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-pj1-f50.google.com ([209.85.216.50]:54847) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1peGdw-000EWw-Hf; Mon, 20 Mar 2023 14:37:49 +0000 Received: by mail-pj1-f50.google.com with SMTP id a16so7980833pjs.4 for ; Mon, 20 Mar 2023 07:37:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679323067; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZS+kStoiDPfNtKY5Xdj+EjvPct3eg8pWySZg9sv0htE=; b=irAWaBXLe4Gw3TmB1s5DtrFugCDY/VolCTnpXDWNq7L7mekpe4RZuWGPIb7ISORWsA C1dvvGOJxPdAEpz/1KSsRaSlvDJbpnvt07MNb7aJHe+bWeXqVdB+IhKORO5WdK4vLv+m 4bWuFkSLqbQ63c6v10v7L8XUlWIoQ6TGZ5eg9hyRWL8j/1S0Agy8krk7xYgMOVWzmdq6 GOeZhWWplhJBC/co9+MkJOvzmpaDlGOOvSeJbZ8zMuBuX7ELPgQZf0ZNz7Q6FQAEBG/f 7H9rtHVKDDn5QZM6pmGnYf/H4c4hNg6rZiIJjV4f7HgdZd7IQRMyXm/jO+6DMwptIRk2 keHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679323067; h=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=ZS+kStoiDPfNtKY5Xdj+EjvPct3eg8pWySZg9sv0htE=; b=A+k2Q5VFlN5ihh4de9C/Z+sfxCHUR4hVli8hTCUkDDOzQIa71aiHKU1W0C0MWmngV5 eGeTo0FTjpcyErSN2+Vc3Rq1DeBnNCchj8DEyv4YBp9z6lg7w2f3UaUKmdDGZXNZlglj kGRCWf24pBhlPfzjw4RmAN4Y16eIN+f2Z56LaUfSeUTTT2/vEuZ4gBMFtB5eowNRrzvX KKklgK0F7uZTzmNuXLFJyVZgIGQN+bawCTlin99jj0HRp5ZWY7MZylp3tBBJJ/GVFsaw PQgbxKdlPoZhHWOo6jr++QolN5oT31URbCAHyLwpfK0zwfB/zGRdJtyYhG+DDs6MCgDf Bg3g== X-Gm-Message-State: AO0yUKXZyd1UBxmh4OuPloc+4GTIqQDu47c+N5q7mrHXgBwyAXP/g2Ub 4zctDAFaCMki4R+ZTQU/8A6uT+chn2uw2gIPbk4= X-Google-Smtp-Source: AK7set8oJ/4FYUMhvYSsc6PSWwcJ6DylqALoNrTQGBQSoecODDqkT4Nl+IJFzVSNwecUAragjahcR1v8S+gy1PCSK6Q= X-Received: by 2002:a17:903:41c4:b0:19f:a694:6d3f with SMTP id u4-20020a17090341c400b0019fa6946d3fmr6662734ple.6.1679323066920; Mon, 20 Mar 2023 07:37:46 -0700 (PDT) MIME-Version: 1.0 References: <1454747193.3405418.1678210315384@mail.virginmedia.com> In-Reply-To: From: Michele Venturi Date: Mon, 20 Mar 2023 15:37:35 +0100 Message-ID: Subject: Re: How to fix run-help-* functions? To: Bart Schaefer Cc: Mikael Magnusson , zsh-workers@zsh.org Content-Type: multipart/alternative; boundary="000000000000ddf58705f755de3b" X-Seq: 51590 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: --000000000000ddf58705f755de3b Content-Type: text/plain; charset="UTF-8" On Mon, Mar 13, 2023, 21:41 Bart Schaefer wrote: 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=( ${(z)cmd_args} ) > + cmd_args=( ${(z)${cmd_args:-"$*"}} ) > > # Discard the command itself & everything before it. > shift $cmd_args[(i)${run_help_orig_cmd:-$1}] cmd_args || > I hope that's enough context,I've an alias named "pkgu" set to "sudo pacman -S -y -u" and "run-help pkgu" gives the same error as before, can you check it on your end? --000000000000ddf58705f755de3b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Mar 13, 2023, 21:41 Bart Schaefer <schaefer@brasslantern.com> wro= te:

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
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if whence "run-help-$1:t&quo= t; >/dev/null
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 then
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 local cmd_args
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0builtin getln cmd_a= rgs
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0builtin getln cmd_a= rgs &&
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 builtin print -z &q= uot;$cmd_args"
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmd_args=3D( ${(z)c= md_args} )
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmd_args=3D( ${(z)$= {cmd_args:-"$*"}} )

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# Discard the= command itself & everything before it.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0shift $cmd_ar= gs[(i)${run_help_orig_cmd:-$1}] cmd_args ||

I hope that's enough context= ,I've an alias named "pkgu" set to "sudo pacman -S -y -u= " and "run-help pkgu" gives
the same = error as before, can you check it on your=C2=A0end?
=
--000000000000ddf58705f755de3b--