It seems, that the problem is the 'entry*' field which is supposed to be in between "choice)" and ";;" in case_entry defined in /usr/share/augeas/lenses/dist/shellvars.aug All types of entries are terminated with "comment_or_eol" which is comment "\n" or ";" unlike shell's "list" which it is probably aimed to interpret. List according to `man bash` is _optionally_ terminated by one of ;, &, or <newline>. In order to support broader subset of valid "case" styles kind of "_noeol" variants of entries should be introduced (there's no ; or "\n" required before ";;"), I see no one-liner fix here. What I see as another problem is incomplete documentation (http://augeas.net/docs/references/lenses/files/shellvars-aug.html states TBD). It's obvious from shellvars.aug, that the Shellvars lens does support relatively small subset of shell syntax (e.g. only "ulimit" | "shift" | "exit" builtins and no arbitrary commands, so usage of e.g. "echo" breaks the load) so documentation should exist and specify what is supported and set expectations properly.
Created attachment 857046 [details] support for oneliners in case Proposing patch adding support for (reasonable subset of) oneliners in case entries. However, I treat this rather as a quick non-invasive dirty fix of this particular hot use case than a final fix. IMHO all entries should be defined according to shell's "list" philosophy i.e. not ending with comment_or_eol and occurrences of entry* should be replaced with something like `(entry . comment_or_eol)*` where ; or eol is mandatory and `(entry . comment_or_eol)* . entry?` where optional.
Fixed in a1b9831d14f22f81cf7dc840160c08cc14234ee9 upstream.
Fixed in Fedora 21 and rawhide, via Augeas 1.3.0.