summaryrefslogtreecommitdiff
path: root/vtysh/vtysh.c
diff options
context:
space:
mode:
Diffstat (limited to 'vtysh/vtysh.c')
-rw-r--r--vtysh/vtysh.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index e3709e07..c575902c 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -677,8 +677,9 @@ new_completion (char *text, int start, int end)
if (matches)
{
rl_point = rl_end;
- if (complete_status == CMD_COMPLETE_FULL_MATCH)
- rl_pending_input = ' ';
+ if (complete_status != CMD_COMPLETE_FULL_MATCH)
+ /* only append a space on full match */
+ rl_completion_append_character = '\0';
}
return matches;
@@ -2214,9 +2215,6 @@ vtysh_readline_init (void)
rl_bind_key ('?', (Function *) vtysh_rl_describe);
rl_completion_entry_function = vtysh_completion_entry_function;
rl_attempted_completion_function = (CPPFunction *)new_completion;
- /* do not append space after completion. It will be appended
- * in new_completion() function explicitly. */
- rl_completion_append_character = '\0';
}
char *