diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2017-09-18 12:03:27 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2017-09-20 15:28:44 +0300 |
commit | 913210973768140ddcc0bb2cb427e8c5e3fa6a1d (patch) | |
tree | 84a7f070f2f3646326f12c869677adb69463b56d /tools/obex-client-tool.c | |
parent | 686dc41f0fb5fc465a8e6cc47680108cf1bcba3b (diff) | |
download | bluez-913210973768140ddcc0bb2cb427e8c5e3fa6a1d.tar.gz |
tools: Only add unique entries to readline history
Don't add duplicate commands to history this is similar to what
HISTCONTROL=ignoredups does.
Diffstat (limited to 'tools/obex-client-tool.c')
-rw-r--r-- | tools/obex-client-tool.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/obex-client-tool.c b/tools/obex-client-tool.c index d0ba8a651..1e3e6f088 100644 --- a/tools/obex-client-tool.c +++ b/tools/obex-client-tool.c @@ -242,7 +242,8 @@ static void parse_line(char *line_read) return; } - add_history(line_read); + if (history_search(line_read, -1)) + add_history(line_read); g_shell_parse_argv(line_read, &argcp, &argvp, NULL); |