mirror of
https://github.com/fluencelabs/redis
synced 2025-04-02 15:51:05 +00:00
Deprecate starting interactive mode using the -i flag
This commit is contained in:
parent
cf0c6b78f1
commit
abb731e5b8
@ -55,7 +55,6 @@ static struct config {
|
|||||||
long repeat;
|
long repeat;
|
||||||
int dbnum;
|
int dbnum;
|
||||||
int argn_from_stdin;
|
int argn_from_stdin;
|
||||||
int interactive;
|
|
||||||
int shutdown;
|
int shutdown;
|
||||||
int monitor_mode;
|
int monitor_mode;
|
||||||
int pubsub_mode;
|
int pubsub_mode;
|
||||||
@ -320,7 +319,10 @@ static int parseOptions(int argc, char **argv) {
|
|||||||
config.auth = argv[i+1];
|
config.auth = argv[i+1];
|
||||||
i++;
|
i++;
|
||||||
} else if (!strcmp(argv[i],"-i")) {
|
} else if (!strcmp(argv[i],"-i")) {
|
||||||
config.interactive = 1;
|
fprintf(stderr,
|
||||||
|
"Starting interactive mode using -i is deprecated. Interactive mode is started\n"
|
||||||
|
"by default when redis-cli is executed without a command to execute.\n"
|
||||||
|
);
|
||||||
} else if (!strcmp(argv[i],"-c")) {
|
} else if (!strcmp(argv[i],"-c")) {
|
||||||
config.argn_from_stdin = 1;
|
config.argn_from_stdin = 1;
|
||||||
} else if (!strcmp(argv[i],"-v")) {
|
} else if (!strcmp(argv[i],"-v")) {
|
||||||
@ -490,7 +492,6 @@ int main(int argc, char **argv) {
|
|||||||
config.dbnum = 0;
|
config.dbnum = 0;
|
||||||
config.argn_from_stdin = 0;
|
config.argn_from_stdin = 0;
|
||||||
config.shutdown = 0;
|
config.shutdown = 0;
|
||||||
config.interactive = 0;
|
|
||||||
config.monitor_mode = 0;
|
config.monitor_mode = 0;
|
||||||
config.pubsub_mode = 0;
|
config.pubsub_mode = 0;
|
||||||
config.raw_output = 0;
|
config.raw_output = 0;
|
||||||
@ -517,10 +518,8 @@ int main(int argc, char **argv) {
|
|||||||
cliSendCommand(2, convertToSds(2, authargv), 1);
|
cliSendCommand(2, convertToSds(2, authargv), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc == 0 || config.interactive == 1) {
|
/* Start interactive mode when no command is provided */
|
||||||
config.interactive = 1;
|
if (argc == 0) repl();
|
||||||
repl();
|
|
||||||
}
|
|
||||||
|
|
||||||
argvcopy = convertToSds(argc+1, argv);
|
argvcopy = convertToSds(argc+1, argv);
|
||||||
if (config.argn_from_stdin) {
|
if (config.argn_from_stdin) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user