From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18436 invoked by alias); 25 Sep 2013 09:29:03 -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: 17999 Received: (qmail 24471 invoked from network); 25 Sep 2013 09:28:57 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at pp1.inet.fi does not designate permitted sender hosts) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1085) Subject: Re: zsh blocks at file truncation From: Marko Vihoma In-Reply-To: <12896374.TIKZVcXBhR@localhost.localdomain> Date: Wed, 25 Sep 2013 12:23:12 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <12896374.TIKZVcXBhR@localhost.localdomain> To: zsh-users@zsh.org X-Mailer: Apple Mail (2.1085) Hello, For a reason unknown with my zsh setup this: $ > file.txt creates a new empty file if it does not exist and complains: zsh: file exists: file.txt if it exists... With this: $ >| file.txt I can truncate the file and write to it whatever i want like with: $ cat > file.txt I must have something setup in my ~/.zshrc for this to work that way, = but I'm too lazy to check :D $ >| file.txt foo bar baz will end with CTRL-D like with $ cat > file.txt. And if I pull what i wrote $ > file.txt from history it will give me $ >| file.txt Oh dear, what is going on? :D On Sep 21, 2013, at 10:10 AM, chandan wrote: > Hi all, >=20 > Like most others I am trying to move from bash to zsh as my default = shell. >=20 > On zsh, Why does the following block indefinitely? >=20 > $ >file.txt >=20 > On bash, the above would truncate a file. Also, on bash 'file.txt' > would be created if it does on exist. >=20 > After some debugging, I found that the above command blocked at the > invocation of the 'cat' command (as provided by 'ps -c '). >=20 > Thanks, > chandan >=20