sh: Optimize setprompt(0).

Avoid doing work to print an empty prompt (such as when reading scripts).
This commit is contained in:
Jilles Tjoelker 2016-02-21 18:54:17 +00:00
parent 5036353a49
commit c39f3bac71

View File

@ -1930,6 +1930,8 @@ static void
setprompt(int which)
{
whichprompt = which;
if (which == 0)
return;
#ifndef NO_HISTORY
if (!el)