Commit 59d3924
prompt: fix missing file errors in zsh
zsh seems to have a bug while redirecting the stderr of the 'read'
command:
% read foo 2>/dev/null <foo
zsh: no such file or directory: foo
Which causes errors to be displayed when certain files are missing.
Let's add a convenience function to manually check if the file is
readable before calling "read".
Signed-off-by: Felipe Contreras <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 68773ac commit 59d3924
1 file changed
+14
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
262 | 269 | | |
263 | 270 | | |
264 | 271 | | |
| |||
321 | 328 | | |
322 | 329 | | |
323 | 330 | | |
324 | | - | |
325 | | - | |
326 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
327 | 334 | | |
328 | 335 | | |
329 | 336 | | |
330 | 337 | | |
331 | 338 | | |
332 | 339 | | |
333 | 340 | | |
334 | | - | |
335 | | - | |
| 341 | + | |
| 342 | + | |
336 | 343 | | |
337 | | - | |
| 344 | + | |
338 | 345 | | |
339 | 346 | | |
340 | 347 | | |
| |||
358 | 365 | | |
359 | 366 | | |
360 | 367 | | |
361 | | - | |
| 368 | + | |
362 | 369 | | |
363 | 370 | | |
364 | 371 | | |
| |||
0 commit comments