since we have wcwidth anyway, expose it as ${%strvar} to the user, iff
utf8-mode is enabled (otherwise it'll be a synonym for ${#strvar} aka the number of octets in it)
This commit is contained in:
4
lex.c
4
lex.c
@ -22,7 +22,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.100 2009/10/04 12:45:22 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.101 2009/11/21 23:23:18 tg Exp $");
|
||||
|
||||
/*
|
||||
* states while lexing word
|
||||
@ -1548,7 +1548,7 @@ get_brace_var(XString *wsp, char *wp)
|
||||
/* State machine to figure out where the variable part ends. */
|
||||
switch (state) {
|
||||
case PS_INITIAL:
|
||||
if (c == '#' || c == '!') {
|
||||
if (c == '#' || c == '!' || c == '%') {
|
||||
state = PS_SAW_HASH;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user