From 8172d054db64bc80a355db111b484719930045bc Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 29 Mar 2013 13:21:53 +0100 Subject: [PATCH] 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 --- libbb/lineedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 45448dfab..93ab86426 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -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 -- 2.25.1