prompt: fix missing file errors in zsh
authorFelipe Contreras <felipe.contreras@gmail.com>
Fri, 11 Apr 2014 23:32:25 +0000 (18:32 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 Apr 2014 20:27:23 +0000 (13:27 -0700)
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 <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found