diff options
Diffstat (limited to 'client/input.c')
-rw-r--r-- | client/input.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/input.c b/client/input.c index 97058712..78319ff8 100644 --- a/client/input.c +++ b/client/input.c @@ -103,8 +103,9 @@ static void rl_handler(char *input) } if (len > 0) { - - add_history(input); + HIST_ENTRY *previous = history_get(where_history()); + if(!previous || strcmp(previous->line, input)) + add_history(input); err = __connmanctl_commands(connection, trim_args, len); @@ -114,6 +115,7 @@ static void rl_handler(char *input) g_strfreev(args); g_free(trim_args); + free(input); } static gboolean input_handler(GIOChannel *channel, GIOCondition condition, |