fix mksh regression: empty line after “whence -v” with not found
spotted by Ypnose via IRC
This commit is contained in:
parent
8f40b65df9
commit
a56f5ccbc4
8
funcs.c
8
funcs.c
@ -38,7 +38,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.262 2014/12/15 23:18:47 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.263 2015/01/04 20:37:59 tg Exp $");
|
||||||
|
|
||||||
#if HAVE_KILLPG
|
#if HAVE_KILLPG
|
||||||
/*
|
/*
|
||||||
@ -597,9 +597,11 @@ c_whence(const char **wp)
|
|||||||
break;
|
break;
|
||||||
case CTALIAS:
|
case CTALIAS:
|
||||||
case CEXEC:
|
case CEXEC:
|
||||||
|
if (vflag)
|
||||||
|
shf_putc(' ', shl_stdout);
|
||||||
if (tp->flag & ISSET) {
|
if (tp->flag & ISSET) {
|
||||||
if (vflag) {
|
if (vflag) {
|
||||||
shf_puts(" is ", shl_stdout);
|
shf_puts("is ", shl_stdout);
|
||||||
if (tp->type == CTALIAS)
|
if (tp->type == CTALIAS)
|
||||||
shprintf("a tracked %s%s for ",
|
shprintf("a tracked %s%s for ",
|
||||||
(tp->flag & EXPORT) ?
|
(tp->flag & EXPORT) ?
|
||||||
@ -609,7 +611,7 @@ c_whence(const char **wp)
|
|||||||
shf_puts(tp->val.s, shl_stdout);
|
shf_puts(tp->val.s, shl_stdout);
|
||||||
} else {
|
} else {
|
||||||
if (vflag)
|
if (vflag)
|
||||||
shprintf(" %s\n", "not found");
|
shf_puts("not found", shl_stdout);
|
||||||
rv = 1;
|
rv = 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user