mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix remaining bug in ${var:-'{}'} (re: d087b031
)
The following problems remained:
$ var=x; echo ${var:-'{}'}
x}
$ var=; echo ${var:+'{}'}
}
src/cmd/ksh93/sh/macro.c: varsub():
- Use the new ST_MOD1 state table to skip over ${var-'foo'}, etc.
instead of ST_QUOTE. In ST_MOD1 the ' is categorised as S_LIT
which causes the single quotes to be skipped over correctly.
See d087b031
for more info.
src/cmd/ksh93/tests/quoting2.sh:
- Add tests for this remaining bug.
- Make the new test xtrace-proof.
Resolves: https://github.com/ksh93/ksh/issues/290 (again)
This commit is contained in:
parent
1aec9b06dd
commit
f31e368795
4 changed files with 25 additions and 4 deletions
5
NEWS
5
NEWS
|
@ -3,6 +3,11 @@ For full details, see the git log at: https://github.com/ksh93/ksh
|
|||
|
||||
Any uppercase BUG_* names are modernish shell bug IDs.
|
||||
|
||||
2021-05-03:
|
||||
|
||||
- Completed the 2021-04-30 fix for ${var<OP>'{}'} where <OP> is '-', '+',
|
||||
':-' or ':+' by fixing a bug that caused an extra '}' to be output.
|
||||
|
||||
2021-04-30:
|
||||
|
||||
- The emacs 'ESC .' (M-.) and vi '_' commands now take shell quoting into
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue