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 19026 invoked from network); 13 Mar 2023 16:07:13 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Mar 2023 16:07:13 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1678723633; b=RdD6Jlx56Z2SaYT03NW603kvZtYYTSHLMU3AwDbHlikomw3w1sGPZdR+9lqSqYS7UN51Y3CdW/ Ix0mp4AF1z4rYMvzjZ0e7CCd/A8fgLQZYi5Uxaf9qwOY4OsiPgQrTzqI8CPlZgTv+ee0jwBGZa k6NMu3LH3qdUDcLG9qqP/kTJKm99lSexi5igqwUtwmwYcuOhZlu/3CXibYO0+f05c3oNU0q615 0bJ8As4unDEdSSiIulW6OzlZKVkKng7tDEGrFK+2cye65ee9Iba7P5wEi838C1A1Tf75Bbmjcg DgGHE+OaygZo0SVLPg+ytSuArgBLBujb4SlHdvpejDtq9g==; 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=1678723633; bh=hLwtZPPGGLfD/azk8wt1zy6XDaz7xd7vFn7Tf5MPy/E=; 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=swPmGzjP286lq2CB9a5vHzluiRcPTVR2iimTU2mFGyqUNlL+R7cDwKT/9tZyfTckLDgpGLUEaT 8Zw74f2sjL7kFR7YANztyRl0tk2U6BaLO3A4qWH2l6JFiYq836ugvgxIQFj+EQGKLuQ/xOefvx Zjtq7SX0+ZF4f8Xl1tDGhew3EU1qDrM4wpLoRJIIVAn9F0wv6RSaEf600s6I1hPXCzlgDT0VPV zxpEPujPuAXLiRz/EccV/Qn1EfQ4VRjEo0QYSE8sRRQedpitVs07TtQR6CH9B9/Dxi65v/DVal oXfZzPfQl7K7NTpdfLXaiePagkDdx9UiLmaS7DR6+uYjow==; 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=Xddvzu3Qey3LIcfwABreTUahj5Lxos4iqBZ5OasVXTo=; b=VJdioue3JSkf6AWa7TAr64hM/0 go3EA/UWzVO4iWgKjz0++k+9JDEqQOLqEUTghPp8eVCzANs6Sy34+jVjvyVXPthac6HdSc5cu1+rm FnZkn3nww0gOEaDteGZZd05aIz+EVkL9v47uVs6TKdyf6SsPYTN8LN+m5RwHKfXncJOpTeCPSVfE4 ko4UATDd7tNlKPwLD802exiZ/x3p+HfLdITBjSCwSi5XH55qourj/rXMqgvhIRaMxbY20dRs4lWVF Ci+iwetO4YhUE/qC7jq7uttilKnT1eHmsL2D/KRduVkXrfYVzO2C23xyQ8wQkVJy2Js4Ym5SmJ5/J 3acPboiw==; Received: by zero.zsh.org with local id 1pbkhc-0006k5-6O; Mon, 13 Mar 2023 16:07:12 +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]:41659) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pbkh3-0006RD-1u; Mon, 13 Mar 2023 16:06:38 +0000 Received: by mail-ed1-f47.google.com with SMTP id h8so7007781ede.8 for ; Mon, 13 Mar 2023 09:06:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; t=1678723595; 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=Xddvzu3Qey3LIcfwABreTUahj5Lxos4iqBZ5OasVXTo=; b=PxOxIeY8VDccncvbKRzz0mGBQ3bJBoWgzXKhj4mrA8HhFPotN2Ub2Dm+g+1MgdC1yW pQWhVEW/05MzKf7J9DX5xZPElqNeY8fbA3RCOemeKGw6JzsHLlzHp0RUXX1V981CA3kp 3PKesUbbR9MkblL6jt4IGandLYSiEbWPk9wD9wMhcVbF2p/Zb8EsOZI7LEP3fJHOod6n HUDjWwce48dMkyUZhsJKZUihHJHlkFHCc4z/yZpAfwbnp9JlXOj1tlVb/eVLp+YAEvFL 54xyFeMTDoO4h0LJxDoRkCTx3d6pA7LNz+ZLtozhZKyZD5ZtNuLVq4AlvP+6G8rSWWWz TE6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678723595; 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=Xddvzu3Qey3LIcfwABreTUahj5Lxos4iqBZ5OasVXTo=; b=us1P+GwgRPBz461m+hEQaFy+T1LPc1/VewvDTukyK3YHusbWS3h3rzBmCGlb12DAkx 83FH+YjX1LTGUZZETbtBXojMTDM94HtlIJIJiBlOfJBVPfgz8Ybw0I41M6fhy1yP5Eyn 7q4ZhACPZpTLm8uvcS6r8YUfrsB1YAH+SC46jPP8PHqMspeFJdjj4m32KKWQwaYdBSZ/ Km1fOFUfLM4bjyLcQsK5wHGhULrPtvGONcIlvn0gq+F87c9tbaZJIvQNPu7tgUbOABxD VIan5z5177JccPkgpxtwQGuTPPA4lDgvSpviLTYjBAUv1d6ZKZfMeRVefFiXHqs7B2yz NaXg== X-Gm-Message-State: AO0yUKVbGyVQyvbWjttVeq6zAlbtrBOirr9yMB6drgpUnHy2uv4y/8ip gdpl5cfNX78Wx14P6g3VK2l6mvwjbbNwWj402p0dvA== X-Google-Smtp-Source: AK7set+GgZxJWlB9rSnbNnjEQyv+cZJrDjTIPYx8neHUlyD7dTieZoBb3OPlLkQ8PM9s6wrS2PSb9InC87HIuYeJdR8= X-Received: by 2002:a17:907:3184:b0:922:1826:8276 with SMTP id xe4-20020a170907318400b0092218268276mr3360184ejb.12.1678723595623; Mon, 13 Mar 2023 09:06:35 -0700 (PDT) MIME-Version: 1.0 References: <1454747193.3405418.1678210315384@mail.virginmedia.com> In-Reply-To: From: Bart Schaefer Date: Mon, 13 Mar 2023 09:06:24 -0700 Message-ID: Subject: Re: How to fix run-help-* functions? To: Michele Venturi Cc: Peter Stephenson , zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51568 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 4:14=E2=80=AFAM Michele Venturi = wrote: > > On Tue, Mar 7, 2023, 18:41 Bart Schaefer wrot= e: >> >> If you don't do the "make install" part, you get an error about a >> "shift" count being wrong, which probably looks like a bug rather than >> a usage problem. > > I've tried this but it doesn't make any difference, When you "configure" or by passing an environment variable to "make" you can specify a custom location for the help files. Because run-help is a shell function, it doesn't have a "source file" and an "object file" so the source itself contains a replacement string @runhelpdir@ which is updated by the installfns.sh script during "make install". Yes, we could have put a "run-help.in" file somewhere and processed that at a different build step to create run-help, but that complicates installing the rest of the functions. The help directory is populated by the Util/helpfiles script, which is run by "make install" in the Doc subdirectory (but I do not recommend attempting to run make in individual subdirectories rather than letting the top-level Makefile drive it.) However, all of that turns out to be necessary but secondary, because the real problem is that you're using run-help wrong. You're not intended to type out "run-help sudo" and hit enter, you're intended to type "sudo" and then invoke the run-help ZLE widget (normally ESC h or Alt+h), which then calls the run-help function with some preliminary setup having been done. 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.