summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
authorRinku Kothiya <rkothiya@redhat.com>2019-01-14 13:24:20 +0000
committergluster-ant <bugzilla-bot@gluster.org>2019-01-14 13:24:20 +0000
commitaf59b2e282f889e9d3887c88bd28fa9a7b2fb706 (patch)
tree2e90cd733844454c791d3ce0a4e03ecc2ffbbf6d /cli/src
parent8be61bbd5719ffb4ba97a6a2b0d35a4ba02e5263 (diff)
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 <rkothiya@redhat.com>
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/cli-rl.c3
-rw-r--r--cli/src/input.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/cli/src/cli-rl.c b/cli/src/cli-rl.c
index cc327c0b3f..6255929e6d 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 0583f648f9..5ac1a20edb 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);