Skip to content

Commit b5622c6

Browse files
committed
GROOVY-8162: Update Groovysh to JLine3 (fix /!ls handling regression)
1 parent e319e6a commit b5622c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/jline/GroovySystemRegistry.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ class GroovySystemRegistry extends SystemRegistryImpl {
3636
// workaround for: https://github.com/jline/jline3/issues/1361
3737
@Override
3838
Object execute(String line) throws Exception {
39+
line = line.startsWith("/!") ? line.replaceFirst("/!", "/! ") : line
3940
def m = line =~ /([a-zA-Z][a-zA-Z0-9_]*)(\s*)=(\s*)(\/?)(\S.*)/
4041
def target = null
4142
if (m.matches()) {
4243
def (_, variable, space1, space2, slash, rhs) = m[0]
4344
if (slash) {
4445
target = variable
4546
line = slash + rhs
46-
line = line.startsWith("/!") ? line.replaceFirst("/!", "/! ") : line
4747
} else {
4848
space1 = space1.size() == 0 ? ' ' : space1
4949
space2 = space2.size() == 0 ? ' ' : space2

0 commit comments

Comments
 (0)