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

Re: $(<nofile) doesn't set $? to non-zero



On Wed, 14 Mar 2018 14:42:48 +0000
Stephane Chazelas <stephane.chazelas@xxxxxxxxx> wrote:
> Would it be worth doing some:
> 
>   	ret = readoutput(stream, qt);
> 	if (errno) {
> 	  zwarn("%e: %s", errno, s);
> 	  lastval = cmdoutval = 1;
> 	}
> 	return ret;
> 
> there (or something cleaner to avoid relying on errno)?

The return value is the linked list as we're in the context of
substitution, not command execution, which isn't easy to change without
a complete rewrite.

pws



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