fixup tilde expansion comments; revert a few bogus dirsep changes
cf. <Pine.BSM.4.64L.1703112129500.29506@herc.mirbsd.org>
This commit is contained in:
17
eval.c
17
eval.c
@ -23,7 +23,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.197 2017/02/17 22:40:12 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.198 2017/03/11 22:49:55 tg Exp $");
|
||||
|
||||
/*
|
||||
* string expansion
|
||||
@ -625,13 +625,12 @@ expand(
|
||||
break;
|
||||
case '=':
|
||||
/*
|
||||
* Enabling tilde expansion
|
||||
* after :s here is
|
||||
* non-standard ksh, but is
|
||||
* consistent with rules for
|
||||
* other assignments. Not
|
||||
* sure what POSIX thinks of
|
||||
* this.
|
||||
* Tilde expansion for string
|
||||
* variables in POSIX mode is
|
||||
* governed by Austinbug 351.
|
||||
* In non-POSIX mode historic
|
||||
* ksh behaviour (enable it!)
|
||||
* us followed.
|
||||
* Not doing tilde expansion
|
||||
* for integer variables is a
|
||||
* non-POSIX thing - makes
|
||||
@ -1717,7 +1716,7 @@ maybe_expand_tilde(const char *p, XString *dsp, char **dpp, bool isassign)
|
||||
|
||||
Xinit(ts, tp, 16, ATEMP);
|
||||
/* : only for DOASNTILDE form */
|
||||
while (p[0] == CHAR && !mksh_cdirsep(p[1]) &&
|
||||
while (p[0] == CHAR && /* not cdirsep */ p[1] != '/' &&
|
||||
(!isassign || p[1] != ':')) {
|
||||
Xcheck(ts, tp);
|
||||
*tp++ = p[1];
|
||||
|
Reference in New Issue
Block a user