Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Re: Superfluous CRs trouble completion routines in Cygwin

On Sun, 23 Oct 2005, Bart Schaefer wrote:

On Oct 23, 10:33am, Peter A. Castro wrote:
}    Since we are talking about console input, though, there may be a tty
} setting to control weither CRs are passed to the input stream.  I'll see
} if I can investigate this.

I'm not all that familiar with how Cygwin simulates UNIX pipelines.  We
are talking about command output piped to the "read" builtin -- is that
the same as console input?

Pipes in Cygwin are a, somewhat, strange beast, because the underlying
mechanism is Windows pipes (the working of which is a topic for a
different discussion).

Pipes can be effected depending on the CYGWIN env var.
If you set: CYGWIN=binmode
Then everything is sent through the pipe (this is the default).
If, however, you set: CYGWIN=nobinmode
Then CRLF will be translated to LF.
Unfortunately, this is a global and would effect every pipe opened
(though it can be overridden, but would mean special case shell code

In any case, stripping CRs from the i/o stream would only mask the
problem.  It'd be at least as helpful to know why adding a CR to the
IFS value causes a segmentation fault.

Agreed.  I haven't been able to repo this scenario (yet).  If whoever can
repo it, could attach a debugger to the shell and the cause it to fault,
they should be able to catch where it's faulting (though finding the
correct thread might be a little tricky).

Peter A. Castro <doctor@xxxxxxxxxxxx> or <Peter.Castro@xxxxxxxxxx>
	"Cats are just autistic Dogs" -- Dr. Tony Attwood

Messages sorted by: Reverse Date, Date, Thread, Author