From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: "Damien Thébault" <damien.thebault@gmail.com>
Cc: Isaac Huang <iclaymore@gmail.com>, zsh-users@zsh.org
Subject: Re: redirecting stdout of no/empty command
Date: Fri, 6 Jan 2012 21:20:51 +0200 [thread overview]
Message-ID: <20120106192051.GA27260@daniel3.local> (raw)
In-Reply-To: <CAEcrOvDimRXcWSrjnuasfQGy0F66xAg1bxTGmjMQ2_cgXCwKvQ@mail.gmail.com>
Damien Thébault wrote on Fri, Jan 06, 2012 at 20:07:35 +0100:
> 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:
>
So do I. My earleir mail described bash's behaviour, not zsh's.
> 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:21 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
2012-01-06 19:20 ` Daniel Shahaf [this message]
[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=20120106192051.GA27260@daniel3.local \
--to=d.s@daniel.shahaf.name \
--cc=damien.thebault@gmail.com \
--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).