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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24807 invoked from network); 26 Nov 2021 13:25:09 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 26 Nov 2021 13:25:09 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1637933109; b=hbxRX42QlGxYuyVqckwGDjm0m5B8LOkfvWhDqhAhdIR3G/Sb1BYCxNjnmkglX0FIvbkRxvaGEV hn0fVlonCdst/K6C/+gsP9OZqeAT6IMNrGPJl7REpoyuRYBVCZXbI3XgiZiuDF2SnQFqEjlLjG ACOuDWYr0alXEVSHfOn/s/8yV9454o8syDIvQKkAeXl+ble1JcMw272KQX6UqOuKPM3sY2qMCp nIhTSTRdRI4c4ZQ2gQiRoPTxC5zYbbyF8VfRYD9DMh+w/KtOtxirgZbdGkRzMo9ibPOdgaegJn nDW5vMdEraCCN8dqNwxEbrgo7ib7cFVCOhhrZu+inVNrnw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-io1-f52.google.com) smtp.remote-ip=209.85.166.52; 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=1637933109; bh=sHcsu9qssozAKBJvr5r5XCd3rMVf5UXMTbfy23zlV3M=; 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=rynVcJ40EoEpf7ZSaVr01d7bEkOXupijnN1VHmeIs5XZxCvVerJ/tlYH0d6Ajof9RkAmpQ3Imh a2Uv09ayUhB0eohSxKcpCD191WQTeKJpTV/rTovvTTaJm9+/PRg4cirndFCzQou5F6DzBywrRM seqrXdYaTj8aZx7cDQxNAFghcrqIp3XRU0kwnYDdIvsQCRzZYxe9LfuR2Mkc0Xi842y/Qf73mC 1o9mP0wPyneKtHXFJhDkZbMiUKyjSQW9dQ/Se1+W66MOIf1wNdE13qWj3yaz+d1qYrgNRSEGq2 1tM80FA2H6fYI/t61SHi5vCtPrdl4JTFP0Ah16QDw/TlnQ==; 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=t8ULPGlYNXSv/Vzaukvgf1E53g83NHM9bxuAXQGdNZw=; b=qXz/dti9U6dmyJQcb6Vk/i68xV 2GyOx+OXxvm6FMmIZKNssyw6vTHVUL1p5oCBVlRYtNW35iAsaQUKZd2IclBSo63wqKt3hzoRoFcyy CsuVq5RiXZfm3IA01dU6QWpIil/sMSMp9xVTGwxXJmaWi5+6oHFqjcxV/TTxasENFJU+gTqlt1736 sh/Prx3MMhGY8vPEFiu8t5IiXPnjbovEC99DpVm8EguJMP9oZ72kFBeJf7MJcck3RJirXVDuRwpkQ wfYesLPsLXeCmcFLEB1uBnlVOTyfuCwamWZqDr4R6ASBZUnMO63VdV1Iyt6Ue7uTqh+NuAYFEo/dY WnhGqpBw==; Received: from authenticated user by zero.zsh.org with local id 1mqbDx-000Mqx-1u; Fri, 26 Nov 2021 13:25:09 +0000 Authentication-Results: zsh.org; iprev=pass (mail-io1-f52.google.com) smtp.remote-ip=209.85.166.52; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-io1-f52.google.com ([209.85.166.52]:40841) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mqbAs-000M3u-ES; Fri, 26 Nov 2021 13:21:58 +0000 Received: by mail-io1-f52.google.com with SMTP id p23so11341273iod.7 for ; Fri, 26 Nov 2021 05:21:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t8ULPGlYNXSv/Vzaukvgf1E53g83NHM9bxuAXQGdNZw=; b=NnthSGXoSKNurRwKoLdtpKHaEMBSVl/yiuM94Ns2/f+8LGJBkPF7N9J6uKGjEnrDSA xnEogGyp0aGbD0AQLgysRHpB2R14dAAjlQl8KPD4zufACRO6EQfsTWjDQWU6CeICBYW+ 3U/2J8snBnLyav8cQY1mih5s0/cGYsg0Sl+h+HtfI+fiUg1MURtz5xSK3PMARpJwzWcz k89hT3buRICCjg51n+4WH+LfYRnJyab2l4nRJIYJyvGVDRsplMnWT7KzSc/+tovRZqsN hmY60Xb40uYuun59UCa+ZGxtZuwjgWhLXBkWM+ehyLyLtALXRm7zi38OU+ETNsDlIlHG ZGow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t8ULPGlYNXSv/Vzaukvgf1E53g83NHM9bxuAXQGdNZw=; b=1dRd3lNRcnJmdSIhjWIATTr78V4PbywAdyGiHMcZa5dVSFhb5h8uZqXBJNpwwc6q2s imodLRIT8CpUGVpoxRLUtpCn5SLlLSDaZgU9YW/WUs61B4L49i0yiIS7LObFxUlN1FiN gx5Jy+9dG0cGGh1hLoZn10Paf5C9t+ZeLQTF7HmjPAIu1kDTL2xEEx3TM3ENN5to95yh FSmnLEafltDZ1jCPjL3hhnVrDh3URLz4OkHYTNRRffxHmJ50idwqKyNjMv0600K1F3B7 XP9Oamn2rqI7p/xJLD3rwcrU5bu+28eq7Lw5q4uu3j1UetjgzlayEsmA/54la6UHQ3oY 1qBg== X-Gm-Message-State: AOAM532yhIee4BZgXga+1E/60gh+HcjqMgsB6LyB619E8+aFdwEEBwUl FUkQLOTRzrzJ9W+VudetsbsL8LTvE3KsVjDUh5o= X-Google-Smtp-Source: ABdhPJxWKy0fsldQ4bV1KfC6QLJitvyI4H+pyVlf74NgyY4DFaj2YeXUmKtCujGqycIqc+WETg2zQBEdSANIo1tKJeo= X-Received: by 2002:a6b:f70e:: with SMTP id k14mr31949778iog.173.1637932916925; Fri, 26 Nov 2021 05:21:56 -0800 (PST) MIME-Version: 1.0 References: <20211125230714.8704@sachi> In-Reply-To: <20211125230714.8704@sachi> From: Pier Paolo Grassi Date: Fri, 26 Nov 2021 14:21:20 +0100 Message-ID: Subject: Re: Re: How to efficiently allow * in a cml string To: jdh Cc: Zsh-Users List Content-Type: multipart/alternative; boundary="000000000000ade95405d1b0f984" X-Seq: 27365 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: --000000000000ade95405d1b0f984 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable What I do for some functions is: function calc(){} alias calc=3D"noglob calc" and then I can do: calc 6*7 42 best Pier Paolo Grassi Il giorno ven 26 nov 2021 alle ore 08:08 jdh ha scritto= : > > Thanks for the lead. > You're right, I do want to avoid having to use quotes and backslashes. > I'll follow up looking into the information you kindly supplied. > > Thank You. > > --------- > > Lawrence Vel=C3=A1zquez wrote: > > > On Wed, Nov 24, 2021, at 12:06 AM, jdh wrote: > > > Is there some way the invoiked script can reach into the buffer befor= e > > > zsh complains about the *. > > > > > > I've tried: 'unsetop GLOB' but that didn't work. > > > > Well yeah, filename expansion happens before the script executes. > > > > > Simple example: How can I get a script to do 2*4 in the below simple > version: > > > > > > $ calculate 2*4 > > > > Presumably you won't be satisfied with > > > > calculate '2*4' > > > > or > > > > noglob calculate 2*4 > > > > You may want to read through this thread beginning with users/27103, > > which already covered a lot of the same ground. > > > > https://www.zsh.org/mla/users/2021/msg00815.html > > > > -- > > vq > > --000000000000ade95405d1b0f984 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
What I do for some functions is:

functi= on calc(){}

alias calc=3D"noglob calc"

and then I can do:

calc 6*= 7
42

best

P= ier Paolo Grassi

Il giorno= ven 26 nov 2021 alle ore 08:08 jdh <dhenman@gmail.com> ha scritto:

Thanks for the lead.
You're right, I do want to avoid having to use quotes and backslashes.<= br> I'll follow up looking into the information you kindly supplied.

Thank You.

---------

Lawrence Vel=C3=A1zquez <larryv@zsh.org> wrote:

> On Wed, Nov 24, 2021, at 12:06 AM, jdh wrote:
> > Is there some way the invoiked script can reach into the buffer b= efore
> > zsh complains about the *.
> >
> > I've tried:=C2=A0 'unsetop GLOB' but that didn't = work.
>
> Well yeah, filename expansion happens before the script executes.
>
> > Simple example: How can I get a script to do 2*4 in the below sim= ple version:
> >
> >=C2=A0 =C2=A0 =C2=A0$=C2=A0 calculate=C2=A0 2*4
>
> Presumably you won't be satisfied with
>
>=C2=A0 =C2=A0 =C2=A0calculate '2*4'
>
> or
>
>=C2=A0 =C2=A0 =C2=A0noglob calculate 2*4
>
> You may want to read through this thread beginning with users/27103, > which already covered a lot of the same ground.
>
> https://www.zsh.org/mla/users/2021/msg00815.htm= l
>
> --
> vq

--000000000000ade95405d1b0f984--