Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: redirecting stdout of no/empty command
- X-seq: zsh-users 16709
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Damien Thébault <damien.thebault@xxxxxxxxx>
- Subject: Re: redirecting stdout of no/empty command
- Date: Fri, 6 Jan 2012 21:20:51 +0200
- Cc: Isaac Huang <iclaymore@xxxxxxxxx>, zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:content-transfer-encoding :in-reply-to; s=mesmtp; bh=oURkDmjLGaNwhbiEyUnrwM4g9fk=; b=fuLK3 ONgfaZQ+MVFKhbxG3SFYbxgoW0t3LvZktVtAtkGO1wNVfmtLpJGcmXMxvefYr0x5 aDqCok1fpUoZhGjCln6/eh73OCEBhGSBJK6pw99PrR9XI572wP2OYBRUg6AyR/gA wc/N4LqNtABIUUNJrJHDWfiC6HItwUMrBM9Kyc=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:content-transfer-encoding :in-reply-to; s=smtpout; bh=oURkDmjLGaNwhbiEyUnrwM4g9fk=; b=lDLk mQXT6SlD04EwkgYa8cUmTu9EqYDSXLPXjI0WUXCpdddlt+NKfqQ9L6QrgpNDqW1/ 7MYPrP8xVgL4KwZENIh1Bnk7tYvNJLcPfe6dFDz6zeDuuLjHYPBAk8W0iEfJSEFq EVrrzAmCJHwaJNhn1raM5+cneDW+8b8gNXsB24E=
- In-reply-to: <CAEcrOvDimRXcWSrjnuasfQGy0F66xAg1bxTGmjMQ2_cgXCwKvQ@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAOtRsER5YhM_-oQyOvRdvCGCx17FhfDj-x_G6kiHi_TsSo=ekA@mail.gmail.com> <20120106184351.GA26599@daniel3.local> <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@xxxxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author