Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: redirecting stdout of no/empty command
- X-seq: zsh-users 16708
- From: Damien Thébault <damien.thebault@xxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: redirecting stdout of no/empty command
- Date: Fri, 6 Jan 2012 20:07:35 +0100
- Cc: Isaac Huang <iclaymore@xxxxxxxxx>, zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IurMLPwM5upIENk1ftiAdVF9E2iBKgYIveVLAB75KYY=; b=JmOpVBwFgQrUJdW8445QA+6fH3EvMjC5/gvFhc08MXQ9mWUZfgs/8qYpGIJjGfxMbK I5LZEQYQNtbAUi8QUnODokEvBmNyR7goUfQUu6FHDow0Cd5BOH3NtXYhIF5FdgBG5x5p 8JODqJvNc6kuH5O/hgBFWu2jC+P++n7ePaiv4=
- In-reply-to: <20120106184351.GA26599@daniel3.local>
- 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>
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:
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