gnodet commented on code in PR #12699:
URL: https://github.com/apache/maven/pull/12699#discussion_r3743198188


##########
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnsh/builtin/BuiltinShellCommandRegistryFactory.java:
##########
@@ -251,6 +259,24 @@ private List<Completer> mvnencCompleter(String name) {
                     shellContext.lookup.lookupMap(Goal.class).keySet())));
         }
 
+        private void mvnlog(CommandInput input) {
+            try {
+                shellLogInvoker.invoke(logParser.parseInvocation(
+                        ParserRequest.mvnlog(input.args(), 
shellContext.invokerRequest.messageBuilderFactory())
+                                .cwd(shellContext.cwd.get())
+                                .build()));
+            } catch (InvokerException.ExitException e) {
+                shellContext.logger.error("mvnlog command exited with exit 
code " + e.getExitCode());
+            } catch (Exception e) {
+                saveException(e);
+            }
+        }
+
+        private List<Completer> mvnlogCompleter(String name) {

Review Comment:
   The tab-completer only offers `--diagnostics`, `--failures`, `--full`, 
`--list` but is missing 5 of the 9 supported options: `--json`, `--module`, 
`--mojo`, `--level`, `--grep`. This reduces discoverability in mvnsh.
   
   ```suggestion
           private List<Completer> mvnlogCompleter(String name) {
               return List.of(new ArgumentCompleter(new StringsCompleter(
                       "--diagnostics", "--failures", "--full", "--list", 
"--json",
                       "--module", "--mojo", "--level", "--grep")));
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to