Public bug reported:
“If word is not needed, it shall not be expanded.” (POSIX)
00:52 < izabera> i=42; : ${var#${q[i=777]}}; echo $i; var=meow; :
${var#${q[i=777]}}; echo $i
00:52 < izabera> prints 42 777 in bash and ksh93
00:52 < izabera> and 777 777 in mkmsh
The #/##/%/%% of course need to expand word first.
Thanks to jilles for the heads-up.
** Affects: mksh
Importance: Medium
Status: Triaged
--
You received this bug notification because you are a member of mksh
Mailing List, which is subscribed to mksh.
Matching subscriptions: mkshlist-to-mksh-bugmail
https://bugs.launchpad.net/bugs/1798397
Title:
too eager expansion in substitution
Status in mksh:
Triaged
Bug description:
“If word is not needed, it shall not be expanded.” (POSIX)
00:52 < izabera> i=42; : ${var#${q[i=777]}}; echo $i; var=meow; :
${var#${q[i=777]}}; echo $i
00:52 < izabera> prints 42 777 in bash and ksh93
00:52 < izabera> and 777 777 in mkmsh
The #/##/%/%% of course need to expand word first.
Thanks to jilles for the heads-up.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mksh/+bug/1798397/+subscriptions