This is an automated email from the ASF dual-hosted git repository. paulk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/groovy.git
commit a0297f77ccc53540100a5fc244afb7392065176c Author: Paul King <[email protected]> AuthorDate: Sat Aug 23 19:02:50 2025 +1000 GROOVY-11740: hook up glob support for groovysh /grep --- .../groovy/org/apache/groovy/groovysh/jline/GroovyPosixCommands.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/jline/GroovyPosixCommands.java b/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/jline/GroovyPosixCommands.java index e20a9aeae9..c06803a1e7 100644 --- a/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/jline/GroovyPosixCommands.java +++ b/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/jline/GroovyPosixCommands.java @@ -581,8 +581,9 @@ public class GroovyPosixCommands extends PosixCommands { if ("-".equals(arg)) { sources.add(new GrepSource(context.in(), "(standard input)")); } else { - Path path = context.currentDir().resolve(arg); - sources.add(new GrepSource(path, arg)); + sources.addAll(maybeExpandGlob(context, arg).stream() + .map(gp -> new GrepSource(gp, gp.toString())) + .collect(Collectors.toList())); } } boolean match = false;
