zsh-workers
 help / color / mirror / code / Atom feed
From: fcook <fcook@protonmail.com>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Global alias mangles input in 5.0.8
Date: Wed, 1 Jul 2015 00:48:23 -0400	[thread overview]
Message-ID: <3bf0cc143e34ae6723d12a7a562258d3@protonmail.ch> (raw)

[-- 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.

             reply	other threads:[~2015-07-01  4:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01  4:48 fcook [this message]
2015-07-01  9:23 ` Peter Stephenson
2015-07-01 20:26   ` Peter Stephenson
2015-07-02  8:45     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3bf0cc143e34ae6723d12a7a562258d3@protonmail.ch \
    --to=fcook@protonmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).