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

Re: Superfluous CRs trouble completion routines in Cygwin



On Oct 15,  1:47pm, Hannu Koivisto wrote:
}
} [...] when I added hline[-1]=${hline[-1]%^M} } to the loop
} 
} _perforce_call_p4 help-commands help commands | while read -A hline; do
}     ...
} done
} 
} the problem disappeared.

The underlying issue here is the one discussed in the thread "Little
problem while converting from bash" back on May 12 (e.g. users/8822).
There was also a lengthy thread "zsh and line breaks" in April 2004
on the zsh-workers list which partly explains how we got to where we
are now.

} I wonder if it made sense to make the "core" completion functions
} such as _describe more tolerant to CRs instead of modifying
} application-specific completion functions? Or can you think of other,
} better ways of getting rid of the problem for good?

I think the answer is that $_comp_setup in compinit should contain

	local IFS=$'\r'"$IFS"

The question is whether it would hurt to treat CR as whitespace in
completion on other platforms -- if it would, then we need to make
that conditional on Cygwin, somehow.



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