From: "Damien Thébault" <damien.thebault@gmail.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: Isaac Huang <iclaymore@gmail.com>, zsh-users@zsh.org
Subject: Re: redirecting stdout of no/empty command
Date: Fri, 6 Jan 2012 20:07:35 +0100 [thread overview]
Message-ID: <CAEcrOvDimRXcWSrjnuasfQGy0F66xAg1bxTGmjMQ2_cgXCwKvQ@mail.gmail.com> (raw)
In-Reply-To: <20120106184351.GA26599@daniel3.local>
On Fri, Jan 6, 2012 at 19:43, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> Isaac Huang wrote on Fri, Jan 06, 2012 at 11:34:26 -0700:
>> Hi list,
>>
>> I noticed a zsh behaviour today. If I tried to run '>/dev/null' (i.e.
>> stdout redirection of no command at all) on an interactive zsh, the
>> zsh would actually run a 'cat', and it wouldn't exit until a ^D or ^C.
>>
>> The same thing on bash seemed to be a no-op.
>
> Actually it truncates the file.
>
> $ echo foo>1
> $ >1
> $ cat 1
> $
>
I have the same behaviour than Isaac:
luke% zsh -f
luke% >file1
[Typing Hello, World^D^D]
luke% cat file1
Hello, World
luke%
(It's not affecting me much since when I need to have empty input, I
use cat /dev/null or echo -n "")
--
Damien Thebault
next prev parent reply other threads:[~2012-01-06 19:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-06 18:34 Isaac Huang
2012-01-06 18:43 ` Daniel Shahaf
2012-01-06 19:07 ` Damien Thébault [this message]
2012-01-06 19:20 ` Daniel Shahaf
[not found] ` <CAEcrOvDimRXcWSrjnuasfQGy0F66xAg1bxTGmjMQ2_cgXCwKvQ__39184.4791862697$1325877047$gmane$org@mail.gmail.com>
2012-01-06 20:36 ` Stephane Chazelas
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=CAEcrOvDimRXcWSrjnuasfQGy0F66xAg1bxTGmjMQ2_cgXCwKvQ@mail.gmail.com \
--to=damien.thebault@gmail.com \
--cc=d.s@daniel.shahaf.name \
--cc=iclaymore@gmail.com \
--cc=zsh-users@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).