mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix BUG_CASEEMPT: empty 'case' list was syntax error
'case x in esac' should be syntactically correct, but was an error: $ ksh -c 'case x in esac' ksh: syntax error at line 1: `case' unmatched Inserting a newline was a workaround: $ ksh -c $'case x in\nesac' (no output) The problem was that the 'esac' reserved word was not being recognised if it immediately followed the 'in' reserved word. src/cmd/ksh93/sh/lex.c: sh_lex(): - Do not turn off recognition of reserved words after 'in' if we're in a 'case' construct; only do this for 'for' and 'select'. src/cmd/ksh93/tests/case.sh: - Add seven regression test for correct recognition of 'esac'. Only two failed on ksh93. The rest is to catch future bugs. Fixes: https://github.com/ksh93/ksh/issues/177
This commit is contained in:
parent
29b11bba3a
commit
e37aa358bf
3 changed files with 15 additions and 1 deletions
3
NEWS
3
NEWS
|
|
@ -5,6 +5,9 @@ Any uppercase BUG_* names are modernish shell bug IDs.
|
|||
|
||||
2021-02-15:
|
||||
|
||||
- Fixed a regression introduced by ksh93 (was not in ksh88): an empty 'case'
|
||||
list on a single line ('case x in esac') was a syntax error.
|
||||
|
||||
- Fixed a bug in the emacs built-in editor, introduced on 2020-09-17, that
|
||||
made the Meta-D and Meta-H keys delete single characters instead of words.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue