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

Re: BUG: failure in "vcs_info prompt" aborts precmd function



On Nov 23,  7:02pm, Peter Stephenson wrote:
} Subject: Re: BUG: failure in "vcs_info prompt" aborts precmd function
}
} On Sat, 22 Nov 2014 14:44:00 -0800
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > On the other hand, I don't know WHY $(<notafile) was made a fatal error.
} 
} Looks like most redirection errors are fatal, so from that point of view

Hmm.

torch% () { cat < notafile ; echo got here }
(anon): no such file or directory: notafile
got here

What was fatal about that?  Even with a builtin:

torch% () { read -E < notafile ; echo got here }
(anon): no such file or directory: notafile
got here

Even this:

torch% print =(<notafile)
zsh: no such file or directory: notafile
/tmp/zshd0zlSR

(Aside:

    cat =(<file) >| file

reads the contents into the temp file for =(...) before clobbering it
for the >| redirection.  Probably handy for something.)

} this would be consistent.  However, from the other point of view,
} $(<...) might be thought to be faking up a subshell, in which case it
} probably shouldn't be.  I suppose that just never got discussed before.
} 
} The principle of least surprise perhaps says it doesn't look like it should
} be fatal, therefore it shouldn't be.

Should I commit/push 33775 then?  Anybody object?



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