Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
How to efficiently allow * in a cml string
- X-seq: zsh-users 27362
- From: "jdh" <dhenman@xxxxxxxxx>
- To: <zsh-users@xxxxxxx>
- Cc:
- Subject: How to efficiently allow * in a cml string
- Date: Thu, 25 Nov 2021 21:06:20 +4000
- Archived-at: <https://zsh.org/users/27362>
- List-id: <zsh-users.zsh.org>
I don't fancy the idea of always using a backslash * to escape the asterisk for a simple script I wrote and one which will never use the * as a wildcard character.
For now I'm using a '@' in it's stead and doing a :gs/@/* to change the @'s into *'.
But, I really want to use the * as is and not have to use @ and then convert it.
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.
Simple example: How can I get a script to do 2*4 in the below simple version:
$ calculate 2*4
Thanks.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author