Skip to content

Commit e4d98fc

Browse files
committed
Clarify the remove keystore command can handle many (#54244)
The remove keystore command can handle multiple settings. In a few places, we were not consistent about mentioning this. This commit addreses this, in the CLI help, and the docs.
1 parent 357a3e6 commit e4d98fc

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

docs/reference/commands/keystore.asciidoc

+10-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ can optionally use an empty string to remove the password. If the keystore is
7272
not password protected, you can use this command to set a password.
7373

7474
`remove <settings>`:: Removes settings from the keystore. Multiple setting
75-
names can be specified as arguments to the `add` command.
75+
names can be specified as arguments to the `remove` command.
7676

7777
`-s, --silent`:: Shows minimal output.
7878

@@ -204,6 +204,15 @@ To remove a setting from the keystore, use the `remove` command:
204204
bin/elasticsearch-keystore remove the.setting.name.to.remove
205205
----------------------------------------------------------------
206206

207+
You can also remove multiple settings with the `remove` command:
208+
209+
[source,sh]
210+
----------------------------------------------------------------
211+
bin/elasticsearch-keystore remove \
212+
the.setting.name.to.remove \
213+
the.other.setting.name.to.remove
214+
----------------------------------------------------------------
215+
207216
If the {es} keystore is password protected, you are prompted to enter the
208217
password.
209218

server/src/main/java/org/elasticsearch/common/settings/RemoveSettingKeyStoreCommand.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919

2020
package org.elasticsearch.common.settings;
2121

22-
import java.util.List;
23-
2422
import joptsimple.OptionSet;
2523
import joptsimple.OptionSpec;
2624
import org.elasticsearch.cli.ExitCodes;
2725
import org.elasticsearch.cli.Terminal;
2826
import org.elasticsearch.cli.UserException;
2927
import org.elasticsearch.env.Environment;
3028

29+
import java.util.List;
30+
3131
/**
3232
* A subcommand for the keystore cli to remove a setting.
3333
*/
@@ -36,7 +36,7 @@ class RemoveSettingKeyStoreCommand extends BaseKeyStoreCommand {
3636
private final OptionSpec<String> arguments;
3737

3838
RemoveSettingKeyStoreCommand() {
39-
super("Remove a setting from the keystore", true);
39+
super("Remove settings from the keystore", true);
4040
arguments = parser.nonOptions("setting names");
4141
}
4242

0 commit comments

Comments
 (0)