zsh-workers
 help / color / mirror / code / Atom feed
* Global alias mangles input in 5.0.8
@ 2015-07-01  4:48 fcook
  2015-07-01  9:23 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: fcook @ 2015-07-01  4:48 UTC (permalink / raw)
  To: zsh-workers

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

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.

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

end of thread, other threads:[~2015-07-02  8:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-01  4:48 Global alias mangles input in 5.0.8 fcook
2015-07-01  9:23 ` Peter Stephenson
2015-07-01 20:26   ` Peter Stephenson
2015-07-02  8:45     ` Peter Stephenson

Code repositories for project(s) associated with this public 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).