lineedit: \W on "/bin" should show "bin", not "/bin"

function                                             old     new   delta
parse_and_put_prompt                                 793     785      -8

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2013-03-29 13:21:53 +01:00
parent 1d14569a66
commit 8172d054db

View File

@ -1875,7 +1875,7 @@ static void parse_and_put_prompt(const char *prmt_ptr)
if (c == 'w')
break;
cp = strrchr(pbuf, '/');
if (cp != NULL && cp != pbuf)
if (cp)
pbuf = (char*)cp + 1;
break;
# endif