Skip to content

Commit

Permalink
feat: Added --version
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed Jun 12, 2024
1 parent acbd370 commit a2cf059
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@

import picocli.CommandLine.ArgGroup;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;

@Command
public abstract class AbstractCommand extends BaseCommand implements InitializingBean, Callable<Integer> {

@Option(names = "--help", usageHelp = true, description = "Show this help message and exit.")
private boolean helpRequested;

@ArgGroup(exclusive = false, heading = "Logging options%n")
private LoggingArgs loggingArgs = new LoggingArgs();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import picocli.CommandLine.Option;
import picocli.CommandLine.Spec;

@Command(usageHelpAutoWidth = true, abbreviateSynopsis = true)
@Command(usageHelpAutoWidth = true, mixinStandardHelpOptions = true, abbreviateSynopsis = true)
public abstract class BaseCommand {

static {
Expand All @@ -19,9 +19,6 @@ public abstract class BaseCommand {
@Spec
protected CommandSpec commandSpec;

@Option(names = "--help", usageHelp = true, description = "Show this help message and exit.")
private boolean helpRequested;

@Option(names = "-D", paramLabel = "<key=value>", description = "Sets a System property.", mapFallbackValue = "", hidden = true)
void setProperty(Map<String, String> props) {
props.forEach(System::setProperty);
Expand Down
2 changes: 1 addition & 1 deletion plugins/riot/src/main/java/com/redis/riot/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import org.springframework.util.unit.DataSize;

import com.redis.riot.core.BaseCommand;
import com.redis.riot.core.Expression;
import com.redis.riot.core.IO;
import com.redis.riot.core.PrintExceptionMessageHandler;
import com.redis.riot.core.Expression;
import com.redis.riot.core.TemplateExpression;
import com.redis.riot.operation.OperationCommand;
import com.redis.spring.batch.Range;
Expand Down

0 comments on commit a2cf059

Please sign in to comment.