From 55b40dfbb2551b1507d532a03bdf199acb37bf6a Mon Sep 17 00:00:00 2001 From: Rinku Kothiya Date: Mon, 14 Jan 2019 13:24:20 +0000 Subject: cli: Added a welcome and help message When gluster command is fired without any arguments it just shows the prompt, so added a welcome message and info to get help. fixes: bz#1535528 Change-Id: I627b66b67443716e9270025c1e47b98b6facba13 Signed-off-by: Rinku Kothiya --- cli/src/cli-rl.c | 3 +++ cli/src/input.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'cli') diff --git a/cli/src/cli-rl.c b/cli/src/cli-rl.c index cc327c0b3f5..6255929e6d2 100644 --- a/cli/src/cli-rl.c +++ b/cli/src/cli-rl.c @@ -346,6 +346,9 @@ cli_rl_input(void *_data) state = _data; + fprintf(stderr, + "Welcome to gluster prompt, type 'help' to see the available " + "commands.\n"); for (;;) { line = readline(state->prompt); if (!line) diff --git a/cli/src/input.c b/cli/src/input.c index 0583f648f95..5ac1a20edb1 100644 --- a/cli/src/input.c +++ b/cli/src/input.c @@ -45,6 +45,9 @@ cli_input(void *d) state = d; + fprintf(stderr, + "Welcome to gluster prompt, type 'help' to see the available " + "commands.\n"); for (;;) { printf("%s", state->prompt); -- cgit