From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4371 invoked by alias); 21 Sep 2013 07:46:51 -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: 17987 Received: (qmail 1513 invoked from network); 21 Sep 2013 07:46:35 -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 closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130921004643.ZM17532@torch.brasslantern.com> Date: Sat, 21 Sep 2013 00:46:43 -0700 In-reply-to: <12896374.TIKZVcXBhR@localhost.localdomain> Comments: In reply to chandan "zsh blocks at file truncation" (Sep 21, 12:40pm) References: <12896374.TIKZVcXBhR@localhost.localdomain> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: zsh blocks at file truncation MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Sep 21, 12:40pm, chandan wrote: } } On zsh, Why does the following block indefinitely? } } $ >file.txt 7.3 Redirections with no command ================================ When a simple command consists of one or more redirection operators and zero or more parameter assignments, but no command name, zsh can behave in several ways. If the parameter NULLCMD is not set or the option CSH_NULLCMD is set, an error is caused. This is the `csh' behavior and CSH_NULLCMD is set by default when emulating `csh'. If the option SH_NULLCMD is set, the builtin `:' is inserted as a command with the given redirections. This is the default when emulating `sh' or `ksh'. Otherwise, if the parameter NULLCMD is set, its value will be used as a command with the given redirections. If both NULLCMD and READNULLCMD are set, then the value of the latter will be used instead of that of the former when the redirection is an input. The default for NULLCMD is `cat' and for READNULLCMD is `more'. -- Barton E. Schaefer