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 1A1A621397 for ; Fri, 23 Feb 2024 19:17:06 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1708712226; b=BjaY8DvkJKojpnJbP8urN5xgLk56arOEPFqAdqcLoYFLrH0vHB4/Mk9KaVup58r/f4YWpYJJjB FyBKkA/Lp4+sE9I9zj3+ZEr8hhGEhXSxnrhOMh4DirJuwgi/UHDvje/LHidZ0lmHpUvqszuJlh /BZpDDHN0ECD76YP9Tw0RwbVFIucwJ1K6VSraJ6JOs3DzCNUw10lbQxI2GxDa2k/iVrKqDyjT5 GGWz1A4s+JBuTVetpqZqWQ0rtlzsjp7iVAJGeeJpp5+DspXzUPov1TYOdpfwlVIo6S7fNDxK3w r2ACatfgDgJYez2BGygdf62x7NPVGvkOHUztKES59vVfCw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; 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=1708712226; bh=Komg76j4gioUNxA1hguFgWgD4mhn8t5DiUK8gFnDi7Q=; 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=snAilPSw1kqkhpzpaUcihVGv7i+QbWY6Sn7tWgY1trwmW76szr/hXu2S1V3I8SsNskpVFbYI0r ZY8/Mon21KOT7O8wk8dHYqP+0wEqxnzpxGZRqkpJovA0VbOa2SRVAQ99wmohQEMHcr/LoBxnRi gYRRiY0g++LGZhZw02d80nSbKD6JAxdbkCDyz1gPIdSHX2nna52UyQa6rEwilnYXfm+D7iaF83 PS15ftEb+qF5lV8CNoQBDcGEoWgpRFrVWNZ8Ds+yiX+YOjk+IMV1FqYfL1a/p632SsLyh8DRvx /buReqT873JQWB++fr3Wi/yrjhupgtV1IKKbEFiqu0z0DQ==; 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=jzZjyNC3c1ryzkJ4jM6GHNKjNOzS47G7DVuzgQn+O9c=; b=QcOV4jAPaFXm1Ma7wS2JSaksVi d19LdNKK7J1vqJDRuypftgBFh8QR+CbUg/BXWQ3B8osQYIE8HXQELEV7u6hy5z7SkP+asUS+dAjyU frFQzW2hqoJOcg+ypr1sV87oVNdl+XUk/t7YKZPwqtODs/zeDcaE8ZUDF95nlZgt3OApOKwOn5xWV ywQdhWbEoTrQaHAxWNAYr56aKdCRt1uDneJutPc4jvBknwYW3x1wMYC3CQyy23MlOHF5ey7MObZrV tMM4f2eRhdMPZiwGBXeZ/dizMvKB9BR1hH7MB8eNB5syqlIq72CKh7/ZVga3p/gNru/tVrM/BYAcR On3YeYBw==; Received: by zero.zsh.org with local id 1rda6c-000Ojf-DF; Fri, 23 Feb 2024 18:17:06 +0000 Authentication-Results: zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; dmarc=none header.from=eastlink.ca; arc=none Received: from mta02.eastlink.ca ([24.224.136.13]:36561) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rda64-000O2q-NN; Fri, 23 Feb 2024 18:16:33 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta02.eastlink.ca ([24.224.136.13]) with ESMTPS id <0S9B0R1OAMR68IR0@mta02.eastlink.ca> for zsh-users@zsh.org; Fri, 23 Feb 2024 14:16:31 -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 da62r4UmJAimnda63rZBpt (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Fri, 23 Feb 2024 14:16:31 -0400 X-Authority-Analysis: v=2.4 cv=Q8Rx4J2a c=1 sm=1 tr=0 ts=65d8e0ff a=e7T7DzMKK1R988ZCg0wLyw==:117 a=e7T7DzMKK1R988ZCg0wLyw==:17 a=r77TgQKjGQsHNAKrUKIA:9 a=QHv9i7WU9scYbG46sToA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=7YfXLusrAAAA:8 a=-CpFmoHjqZ_bQ8Gut54A:9 a=_W_S_7VecoQA:10 a=SLz71HocmBbuEhFRYD3r:22 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeeigdduuddtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurheptgfkffggfgfuvfhfhfgjsegrtderredtvdejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpefhteethfevgeeuvdelgefgvdevudefueduffdvgfelvddvgfdtieegueeuleeifeenucfkphepvdegrddvtdejrdduledrudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrdduledrudefpdhhvghloheplgduledvrdduieekrddtrdduudgnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Content-type: multipart/alternative; boundary="------------BAqV0ABYiIjY2uiqsr4bTnzy" Message-id: <0a15d4f3-e222-4100-ad5f-e702dacbad9c@eastlink.ca> Date: Fri, 23 Feb 2024 10:16:30 -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> From: Ray Andrews In-reply-to: <20240223104901.35a540adb685459cdfe3c2a5@gmx.com> X-Seq: 29696 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. --------------BAqV0ABYiIjY2uiqsr4bTnzy Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-02-23 09:49, Duke Normandin wrote: > .zshrc:92: defining function based on alias `ls' > .zshrc:92: parse error near `()' > > nls() {ls --group-directories-first -c --color ~/notes/${1} } > You'll be getting better answers shortly, but for now: You can't have an alias like that inside a function.  Somewhere oh-my-zsh has aliased 'ls' so you've either got to change that alias or do this: nls() {/usr/bin/ls --group-directories-first -c --color ~/notes/${1} } ... so that the shell knows to use the binary command. --------------BAqV0ABYiIjY2uiqsr4bTnzy Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

On 2024-02-23 09:49, Duke Normandin wrote:
.zshrc:92: defining function based on alias `ls'
.zshrc:92: parse error near `()'

nls() {ls --group-directories-first -c --color ~/notes/${1} }

You'll be getting better answers shortly, but for now:

You can't have an alias like that inside a function.  Somewhere oh-my-zsh has aliased 'ls' so you've either got to change that alias or do this:
nls() {/usr/bin/ls --group-directories-first -c --color ~/notes/${1} }

... so that the shell knows to use the binary command.

--------------BAqV0ABYiIjY2uiqsr4bTnzy--