Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Different behaviour of zsh with two input redirections compared to all other POSIX shells I have installed
- X-seq: zsh-workers 33972
- From: Axel Beckert <abe@xxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Different behaviour of zsh with two input redirections compared to all other POSIX shells I have installed
- Date: Mon, 15 Dec 2014 12:33:14 +0100
- Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAAAAAC3mUtaAAAABGdBTUEAALGPC/xhBQAAADh0RVh0U29mdHdhcmUAWFYgVmVyc2lvbiAzLjEwYSAgUmV2OiAxMi8yOS85NCAoUE5HIHBhdGNoIDEuMindFS5JAAACGElEQVQ4jXXQMU8UYRDG8f8shNjdDH4AbpfGDjAWlKiJiZ0ajL1aGCvsNCbGaCGG1koLaztaTYz6ATy+gOyehYmF3MxVxgg3FnDsHcTpJr/M+8w7Rf6nCsaVTTDqxbg9hoOXmw83H71+Eyfg4E1d7/Z2fG9rGkZbTQiu+K+3U/C+76lmkvAhJuDndnoAiftou4V84okAGclop4U/jYACZDTxrYWP0gkxVfAm/W//GLZpxIzwIN0Hn8dw0B+IWkZmQmRsj2HfhwokEklHfNCCiQCRgAR7YyhQVRVTCKCzP4Y5zBBE0t0zY3Q8oQaBqqAMlVEcgVQd9706zGirAFium8HXumlMIeMwqQCInju+2+uB6MRENupdpMt8pRlHZyuAW0F+Mb6XSIVqtxjD+iVmVqqystLEzFTGT92YqRaXpNT5eTVjeJhbALPnrTxLUZUKZsgxcNm64hAOYisT/xhF+oKTGU5RegtC3Rt6eEDi/QnIevdTx9Md2EMmYBRmCQR1026FCGQQJJExsRUqgkMGaWSbwYLnoO4T6VgpbQbdELPMBAHWWrhYrcxXnYgAsatPWygkFCBD4K62MAsOTqA6szYRPpsu6e6Y8mPiVrBMNuGIMrgwBUu4p2DgG1Ownu6hpuTv7hScefHAzAC/yRRw5U5pALMbJ4AUALvHSZhxgHPXTsHcdWD1GadAHr9avP+c0wCr7263Df8ASLwXWHWs+KIAAAAHdElNRQfYBQEBODPr
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: DeuxChevaux.org -- The Citroën 2CV Database
Hi,
while I was debugging some non-zsh related issue with "yes '' |
sometool", I noticed that zsh behaves differently in the following
(possibly neither common nor useful, likely esoteric :-) case:
~ → cat /tmp/bar.txt
bar
~ → zsh -c 'echo foo | cat -v < /tmp/bar.txt'
foo
bar
~ → bash -c 'echo foo | cat -v < /tmp/bar.txt'
bar
~ → dash -c 'echo foo | cat -v < /tmp/bar.txt'
bar
~ → ksh -c 'echo foo | cat -v < /tmp/bar.txt'
bar
~ → mksh -c 'echo foo | cat -v < /tmp/bar.txt'
bar
Interestingly some non-POSIX shells have the probably sanest approach:
~ → tcsh -c 'echo foo | cat -v < /tmp/bar.txt'
Ambiguous input redirect.
~ → csh -c 'echo foo | cat -v < /tmp/bar.txt'
Ambiguous input redirect.
(And yes, csh is _not_ a symlink to tcsh on that system. :-)
Is this expected/wanted zsh behaviour? Is this something we should fix
in zsh? And if so, should it rather behave like bash or like tcsh? :-)
I tend to tcsh's variant although I suspect that this could cause more
breakage than bash's behaviour.
Kind regards, Axel
--
/~\ Plain Text Ribbon Campaign | Axel Beckert
\ / Say No to HTML in E-Mail and News | abe@xxxxxxxxxxxxxxx (Mail)
X See http://www.nonhtmlmail.org/campaign.html | abe@xxxxxxxxx (Mail+Jabber)
/ \ I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author