From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14928 invoked by alias); 6 Jan 2012 19:21:26 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16709 Received: (qmail 19631 invoked from network); 6 Jan 2012 19:21:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) 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= X-Sasl-enc: lPFQ6V2PZRigaieNMjWSG0yExg+F+sbP8sV6dQt8epER4FkHN13af4wUbCFYYw 1325877682 Date: Fri, 6 Jan 2012 21:20:51 +0200 From: Daniel Shahaf To: Damien =?iso-8859-1?Q?Th=E9bault?= Cc: Isaac Huang , zsh-users@zsh.org Subject: Re: redirecting stdout of no/empty command Message-ID: <20120106192051.GA27260@daniel3.local> References: <20120106184351.GA26599@daniel3.local> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Damien Thébault wrote on Fri, Jan 06, 2012 at 20:07:35 +0100: > On Fri, Jan 6, 2012 at 19:43, Daniel Shahaf 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