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,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5615 invoked from network); 17 May 2023 22:46:35 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 May 2023 22:46:35 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1684363595; b=bfFudzE9iFP21JiMkXEezJFap+bCyhmYBBdvXRzXapvd0CI45ulEohYNaNECNFR3nSYybE0Ktd k8MhtMEJfCo/xqeJ1/l1hdXxmaGdH6sizVMETujjTs7jCIcMbk1RwIT5Iy/bPY1ggHqqJx/r/T F5jaeflZT//D2keVqlhQZhVciB1l/dIzZapmeb5tu1MiBq41yoUdy5OgsnccRKbKoFVYtcVpq+ SBhITKkk1UrOHwb4m2lnxj/WH5H3+N/vrPyUDuMR4viAACnQdBfW7qNwNB3F+zHnynaoGp+aDk ojh6c6XSrFb5BkSXg3WfgJMCb6kDCuiT1rDnWTZMh7UFGw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f46.google.com) smtp.remote-ip=209.85.218.46; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 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=1684363595; bh=/+M5MkJ2fmpZjEY+VDkbxpeMb2qDQbuBqc8uRVUUOqM=; 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=Uknao7QUYnRsu8Rwq11wrA0hYv8UnT/U9TnjBvozrdLW/Nv4ORYJ9TPAtg9jnVH7o+GiulSJkC f+/M4QDsoZY569rz4OPqAMWnr8dtQRuXv2wRUcOA5zKrGk1tBDI18WZpWzUgRGPge59Ee6c7fk /Ol12bKeacXcJtTmkq/xFG95pj4IHst07ZvnEjtBUdaFT9IM8gkN9/6lHY/6G0JHRjEzYWG0og MSMs3r0+2D884D43ihnzOFy0v/TXbdz5iByv4qg5G9H/7UT1Pu1HEQhLud6UNHQR/u0GCqfLVe t7CmowlBbLlPMRP4QDlxsOKsARMn1oldFkC2hFGOlOljqw==; 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=ZeWVtiTY5hPlKG7Ww6SCWEe9M5gK5Exb+9mDkW29CFg=; b=UvJ02o86fKQjC+zu4TRngu2PsL reNktDjAIezpXp++56lCiIp90oG+IfNpIuWLZnRFexXMEGfKwjxz11+aANimt9q0zhkog3nn59Sci gNUABI+SWvMt+CDzlW+Lyu4yAhy4RW0DQCaVDp9JksWIlnvqgx4XmNuOiJgSJ2C+sgfKcrmvjBQmw ky7tU/QetnRSWrtDjt4E+l3QrZmiwE94sPAGZiOss7mvSU1xVYQzt/Pi/eGSNHDkqpjlsBPNXqVnR GJ0Wvw5rfiOzbxPNYouTorNRJngrSqbblcKN5R1hOUDzrr/SRgQwMjKTHNaihImwz/YK97xCx09R5 GXYY8OFw==; Received: by zero.zsh.org with local id 1pzPul-000BeH-3g; Wed, 17 May 2023 22:46:35 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f46.google.com) smtp.remote-ip=209.85.218.46; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f46.google.com ([209.85.218.46]:42230) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pzPuB-000BJh-0X; Wed, 17 May 2023 22:46:02 +0000 Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-965b5f3b9ffso111605866b.0 for ; Wed, 17 May 2023 15:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20221208.gappssmtp.com; s=20221208; t=1684363558; x=1686955558; 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=ZeWVtiTY5hPlKG7Ww6SCWEe9M5gK5Exb+9mDkW29CFg=; b=tXjpX2ElvgZhUp/7Lchq2kn2MAFS2OPD16sHbUTS47GPkJTD2ICMeX+6tFcoYkDJ07 L6iTyXK7KoB+ijE3OBELmLBzhtXDe84AAK/FjAe4MJl2qmzUlXAEwiVdcLqGNvLMAilD SxPDEIVoaFAWLb6OweCrS0xeAdWusnXPNFW6OicYS1Mby0MyEf9scTylUlMtSk2/8JQr soPJ7DAvaI7xJVGts12+ChHsyDsSDvtLag8etuCWxeOS6uc0OpHXdf0r1DbakxnZUXx2 snciF3zOOH3hzW/kMceW0JeMUQCK1J2FKS2JxBGpOTkjzdsEjEaiGXtdX4YYvtj3Tttj o83w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684363558; x=1686955558; 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=ZeWVtiTY5hPlKG7Ww6SCWEe9M5gK5Exb+9mDkW29CFg=; b=J/G5ivpaTaX3MnLXC6AxdSlSkshaQciaIx2w99qG0g7OUtcpeiAHQNk4sQpdTNCFdq Az03oHAtaOO30NrLX++dztc7/0B5p0LMsv8ty7nUqOh14VCs6aBF2xMounfYLfasCfFT zwCsSbkvFtGLGcNteqVXiKvTuIHtlA4IWzOkoEXEIolL0l+ZZK49pxGJ9N3w5jo4rbSR Q1/Ix/CXyabDTG+6JCdKSp4m53uMCwA8BCoiqRb9lnnm/O21MuEin78jWpbXrC3utAQA ajc0s45SdhCNfcZ38MySAqRlo9lvDeZc/jpSCYnueABQ83cNnSDs0lRByN9mNScNg4kf gYsg== X-Gm-Message-State: AC+VfDyYyybTx8aQU8d/VXLfDePQceFrYU22eETkFrRhiAXz1eOhACX0 SU+sPsv94l33h60p4J8tLqEDZyyKb62z4HHGpTHxKCMIUtSBBRBdq+Q= X-Google-Smtp-Source: ACHHUZ7zYaP3gr6MAbLJ/QIPBQkHuu+iMoXfuq20ZdSNdT95L3HwxUsRDFpipjnciSw0op/THwKfhtB2QNeKpiy8DY4= X-Received: by 2002:a17:907:7f03:b0:94e:4285:390c with SMTP id qf3-20020a1709077f0300b0094e4285390cmr4489177ejc.10.1684363558261; Wed, 17 May 2023 15:45:58 -0700 (PDT) MIME-Version: 1.0 References: <2322b9b9b46c585516c4347ad3b07a9db26f0a7f.1684361567.git.joerg@jo-so.de> In-Reply-To: <2322b9b9b46c585516c4347ad3b07a9db26f0a7f.1684361567.git.joerg@jo-so.de> From: Bart Schaefer Date: Wed, 17 May 2023 15:45:47 -0700 Message-ID: Subject: Re: [PATCH 1/4] run-help: Support variables in aliases To: =?UTF-8?B?SsO2cmcgU29tbWVy?= Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51750 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 Wed, May 17, 2023 at 3:13=E2=80=AFPM J=C3=B6rg Sommer w= rote: > > If the alias definition starts with a variable assignment, run-help fails= , > because it sees the variable assignment as command. Hence, skip all > variable assignments and noglob|nocorrect thereafter. This may not be the right way to handle this. The same thing is already being attempted in the block at (*) if ((! didman++)) then where you'll see # Discard the command itself & everything before it. so I would have expected the existing recursive call to cover it. If recursion is NOT handling it, then maybe we need to pull that whole thing up to before the original "whence" command? Either way, we already have (*( is an alias for (noglob|nocorrect))*) which would be made redundant by your addition of + elif [[ $expansion[1] =3D=3D (noglob|nocorrect) ]] I repeat my earlier remarks about "reaching the point of diminishing returns" with our attempts to turn run-help into a full command-line parser.