Skip to content

Add missing space in error message between command and subcommands#1349

Open
czpilar wants to merge 1 commit intospring-projects:mainfrom
czpilar:patches/missing-space-in-error-msg
Open

Add missing space in error message between command and subcommands#1349
czpilar wants to merge 1 commit intospring-projects:mainfrom
czpilar:patches/missing-space-in-error-msg

Conversation

@czpilar
Copy link
Copy Markdown
Contributor

@czpilar czpilar commented May 4, 2026

Consider this configuration:

package org.springframework.shell.samples.helloworld.boot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.shell.core.command.annotation.Command;
import org.springframework.shell.core.command.annotation.Option;

@SpringBootApplication
public class SpringShellApplication {

	public static void main(String[] args) {
		SpringApplication.run(SpringShellApplication.class, args);
	}

	@Command(name = "hello sub1 sub2", description = "Say hello to a given name", group = "Greetings",
			help = "A command that greets the user with 'Hello ${name}!'. Usage: hello [-n | --name]=<name>")
	public void sayHello(@Option(shortName = 'n', longName = "name", description = "the name of the person to greet",
			defaultValue = "World", required = true) String name) {
		System.out.println("Hello " + name + "!");
	}

}

There is missing space in error message when ommiting required option:

obrazek

Signed-off-by: David Pilar <david@czpilar.net>
@czpilar czpilar force-pushed the patches/missing-space-in-error-msg branch from 1ec59fe to e59c94a Compare May 4, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant