zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: zsh blocks at file truncation
Date: Sat, 21 Sep 2013 00:46:43 -0700	[thread overview]
Message-ID: <130921004643.ZM17532@torch.brasslantern.com> (raw)
In-Reply-To: <12896374.TIKZVcXBhR@localhost.localdomain>

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


  reply	other threads:[~2013-09-21  7:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-21  7:10 chandan
2013-09-21  7:46 ` Bart Schaefer [this message]
2013-09-21  7:53 ` Phil Pennock
2013-09-25  8:49 ` zzapper
2013-09-25  9:23 ` Marko Vihoma
2013-09-25 14:54   ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=130921004643.ZM17532@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).