zsh-users
 help / color / mirror / code / Atom feed
* Re: Re: How to efficiently allow * in a cml string
@ 2021-11-24  7:07 jdh
  2021-11-26 13:21 ` Pier Paolo Grassi
  0 siblings, 1 reply; 2+ messages in thread
From: jdh @ 2021-11-24  7:07 UTC (permalink / raw)
  To: zsh-users


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ázquez <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 before 
> > 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Re: How to efficiently allow * in a cml string
  2021-11-24  7:07 Re: How to efficiently allow * in a cml string jdh
@ 2021-11-26 13:21 ` Pier Paolo Grassi
  0 siblings, 0 replies; 2+ messages in thread
From: Pier Paolo Grassi @ 2021-11-26 13:21 UTC (permalink / raw)
  To: jdh; +Cc: Zsh-Users List

[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]

What I do for some functions is:

function calc(){}

alias calc="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 <dhenman@gmail.com> 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ázquez <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 before
> > > 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
>
>

[-- Attachment #2: Type: text/html, Size: 2263 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-26 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24  7:07 Re: How to efficiently allow * in a cml string jdh
2021-11-26 13:21 ` Pier Paolo Grassi

Code repositories for project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).