From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 4AE662533A for ; Fri, 23 Feb 2024 20:27:01 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1708716421; b=lp7fQXA72mcZO0/aGunEWOG6lVWB17vTEo26gpXKdL++4yIcUq4U3OyUgD/tpiQpMTwWuR1sdp CeEvUfaLFzi3CesLCAUUFL7SDzEXA82SUoAFsHtl2Gj66NUpdnbBykBylCVgR75w7uUEAilanK GkbhNylVtVPFbeJ+1a++E82tOlsG0MG8l9ohXOybBGt4+i8ZRzY3ryNmDOBRJHi7fV4MKN5i1t oD7GdSpe5CqwwIxE+c+1uSmuC2SpIt5w8MAA6Yc9sF85/xC4ddAsf+8BpJkHKzcd33dhme0zie YdFVomgvfPPP72X00V6AguaHqk1Oo47mOFAZx4qfUkURdg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta04.eastlink.ca) smtp.remote-ip=24.224.136.10; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1708716421; bh=QsHLLLD6DHEPCyZWKyroECvlKQbBN8a18syJUUqJ1dk=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Content-Type:DKIM-Signature; b=h0Dri5Vugrc58csuaF+FyA2BOeywpypwcpPiGSIHpupU7QZOOzh8tvHtl2aauncjrDEnOJf4XO JQv5YFfmSSPgv0cAdRmvkYlFmOFTS+jIirf8YTQ8NPlp1+3YPc7AbsxEPFeOeB6EzHV71XMA1g +Nxv73b5KhD9wwNvyikWpVkG4s7HlxdbbEqV+PKFe+f8ZhR31sbhNh7khd8fDh0j5JXBYa6rFS 9stB61ZonnGg7PVDuC5HvQprvinqf1dT6G76PY2xY6Mi4HqPNBpYfc8OnghE+DYyMb2vx+WwfL 9U5ovIUD2nf97RRbdAbbajUgrJ0uuSJdzYxsJuJSPVEL8g==; 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:In-reply-to:From:References:To: Subject:MIME-version:Date:Message-id:Content-type:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=S5jaz0ppVFVrX8jfZitk/0n97eePJOb5vT2JSrhfwNI=; b=GA794eyjqMEyem5QuiIPafYVAf JIu0oTlCi0saBM69icIuJvJYUA/xWEkDb9uPTqvxOdeKxaPVfBbyBYeL66pui/kFXLRTOGxOObHIc 83vNAG4JLMBW+AecPDEYH2IwDxa9jb2H0E4ySUu0uOZ9igz2p/j3Ki1ZKb3MjJQPyaaa/nxwfMdtw 6dp10BmLcUtIllBSEM/KP3qhh38oPSEBlGrSk4zj3Ea9EgU7RyOI3b1M43ovGaKnVOdSPfEwb3kbU 42c/f3sCr85b2c4QVG5r2we7r8zwz4KQfUyzyBp9xzp+V5vUZOcQPgyaJInsnYnJliOoE6wp7NvG1 +ASH1BeQ==; Received: by zero.zsh.org with local id 1rdbCH-000Cdr-D0; Fri, 23 Feb 2024 19:27:01 +0000 Authentication-Results: zsh.org; iprev=pass (mta04.eastlink.ca) smtp.remote-ip=24.224.136.10; dmarc=none header.from=eastlink.ca; arc=none Received: from mta04.eastlink.ca ([24.224.136.10]:47917) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rdbBm-000Bwn-UP; Fri, 23 Feb 2024 19:26:32 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta04.eastlink.ca ([24.224.136.10]) with ESMTPS id <0S9B0QTCOPKBUEW0@mta04.eastlink.ca> for zsh-users@zsh.org; Fri, 23 Feb 2024 15:26:29 -0400 (AST) Received: from [192.168.0.11] (host-24-207-19-13.public.eastlink.ca [24.207.19.13]) by csp01.eastlink.ca ([71.7.199.166]) with ESMTPSA id dbBkr4fVlAimndbBlrZEjF (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Fri, 23 Feb 2024 15:26:29 -0400 X-Authority-Analysis: v=2.4 cv=Q8Rx4J2a c=1 sm=1 tr=0 ts=65d8f165 a=e7T7DzMKK1R988ZCg0wLyw==:117 a=e7T7DzMKK1R988ZCg0wLyw==:17 a=r77TgQKjGQsHNAKrUKIA:9 a=vbu0NK4zxMFQm5CZvucA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=pGLkceISAAAA:8 a=mN7A818V4fADARM0htUA:9 a=GMfALMuWAE8PUXrw:21 a=_W_S_7VecoQA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeeigdduvdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurheptgfkffggfgfuvfhfhfgjsegrtderredtvdejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpefhteethfevgeeuvdelgefgvdevudefueduffdvgfelvddvgfdtieegueeuleeifeenucfkphepvdegrddvtdejrdduledrudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrdduledrudefpdhhvghloheplgduledvrdduieekrddtrdduudgnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Content-type: multipart/alternative; boundary="------------eF76OGlokhHfPZEu0enmNZxz" Message-id: Date: Fri, 23 Feb 2024 11:26:28 -0800 MIME-version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Problem with user function Content-language: en-US To: zsh-users@zsh.org References: <20240223104901.35a540adb685459cdfe3c2a5@gmx.com> <0a15d4f3-e222-4100-ad5f-e702dacbad9c@eastlink.ca> From: Ray Andrews In-reply-to: X-Seq: 29707 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: This is a multi-part message in MIME format. --------------eF76OGlokhHfPZEu0enmNZxz Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-02-23 10:31, Roman Perepelitsa wrote: >> You can't have an alias like that inside a function. > You can. Try it. This is basically a dead issue now, but trying it is exactly what I did: % alias X='echo howdy'; Y() { X } zsh: defining function based on alias `Y' zsh: parse error near `()' ... but maybe that's not exactly the same thing.  I just noticed the same messages. BTW, interesting that his problem was solved by adding 'function' -- I though that was always optional, but in this case the parser seems to care. ======================================= > > Roman. > --------------eF76OGlokhHfPZEu0enmNZxz Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

On 2024-02-23 10:31, Roman Perepelitsa wrote:
You can't have an alias like that inside a function.
You can. Try it.
This is basically a dead issue now, but trying it is exactly what I did:


% alias X='echo howdy'; Y() { X }
zsh: defining function based on alias `Y'
zsh: parse error near `()'

... but maybe that's not exactly the same thing.  I just noticed the same messages.

BTW, interesting that his problem was solved by adding 'function' -- I though that was always optional, but in this case the parser seems to care. 

=======================================



Roman.


--------------eF76OGlokhHfPZEu0enmNZxz--