summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorRinku Kothiya <rkothiya@redhat.com>2019-01-14 13:24:20 +0000
committerAtin Mukherjee <amukherj@redhat.com>2019-01-21 03:23:23 +0000
commit55b40dfbb2551b1507d532a03bdf199acb37bf6a (patch)
tree2e90cd733844454c791d3ce0a4e03ecc2ffbbf6d /cli
parentc5bb929b367121f2610f74630882254da7fd882a (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')
-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 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);