Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Global alias mangles input in 5.0.8
- X-seq: zsh-workers 35664
- From: fcook <fcook@xxxxxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Global alias mangles input in 5.0.8
- Date: Wed, 1 Jul 2015 00:48:23 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.ch; s=default; t=1435726103; bh=UgyLKi/9HDhqdK2+DRxZUCN6CtvKYYP5l7rQ0F57yrc=; h=To:Subject:Date:From:Reply-To; b=ucufvHJPmXq8hJKUlGxu2tVg9WPo5BiMyi5KfwIcDz+4vtmICHr+hNR8/hqDL2xS7 fReTfoPe4sMhGU0X+vQkg5PZk6ZfS/R8miSykAaGzlQZXXOSu9BnvRCyXKZlJkbh6a 7LWAGLt3tswcWttYANzHrsWEEyc1Ej82y2NNn7v0=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Reply-to: fcook <fcook@xxxxxxxxxxxxxx>
I'm running on x86-64 Arch Linux, and noticing what looks like a bug doing the following:
> alias -g '$'='4<<('
> cat /proc/self/fd/4 $ ls )
The behavior of setting and using an alias like this in zsh 5.0.7 is relatively sane: the result of ls is piped through cat.
But under zsh 5.0.8, I get an error: "zsh: no such file or directory: s )".
I really don't understand why the first letter of "ls" is being removed or why the space and the closing paren are considered part of the same token as the 's'.
To further confuse matters, the precise filename in the error depends on how long the expansion of the alias is. If I add a space, and set it to '4 <<(' (or, to identical effect, put the space in front of the 4 instead of after), the file not found is " )" (without the 's'). Another space and the file is just ")", and with three spaces zsh is failing to find a file named the empty string.
Beyond three spaces I get "zsh: unterminated `<(...)'", which is surprising since the right paren is fairly clearly visible in the line to alias-expand.
For what it's worth, I see the same behavior with a non-special token being aliased, such as 'x' instead of '$'.
Thanks for your time.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author