Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Quoting the arguments to a function
- X-seq: zsh-users 21920
- From: Philippe Troin <phil@xxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Quoting the arguments to a function
- Date: Thu, 15 Sep 2016 15:17:29 -0700
- In-reply-to: <nrf4he$u13$1@blaine.gmane.org>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <nrf4he$u13$1@blaine.gmane.org>
On Thu, 2016-09-15 at 14:41 -0700, zv wrote:
> I want to supply the arguments of a function (an alias to Emacs `calc') without expansion, e.g:
>
> zv@computer# calc 20/2*15
> 150
>
>
> Today of course the result gives "zsh: no matches found: 20*15/2"
>
> Is there any way to signal to ZSH that an alias or fn should have arguments supplied literally?
Well, not exactly, you can turn off globbing with:
alias calc='noglob calc'
But that won't work for:
% calc 0xff&0x80
still would be parsed as:
% calc 0xff &
% 0x80
Phil.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author