Make cli behave more like bash

Replxx has the default CTRL-W and ALT-Backspace keybinds swapped to do the
opposite from bash. I think the cli should do the same thing bash does.
Also, bash recognizes word-splitting characters with the `isalnum`
function. I can't think of a good way to replicate this with replxx, so
I set the word-splitting characters to a set I use as special characters
in the cli's syntax.

Change-Id: Ibecb71a541112879ab3a6ae0009c3da39632f259
diff --git a/src/main.cpp b/src/main.cpp
index c6e3fce..d1b45e0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -37,7 +37,16 @@
 
     SysrepoAccess datastore("netconf-cli");
     Parser parser(datastore.schema());
-    replxx::Replxx lineEditor;
+
+    using replxx::Replxx;
+
+    Replxx lineEditor;
+
+    lineEditor.bind_key(Replxx::KEY::meta(Replxx::KEY::BACKSPACE), std::bind(&Replxx::invoke, &lineEditor, Replxx::ACTION::KILL_TO_BEGINING_OF_WORD, std::placeholders::_1));
+    lineEditor.bind_key(Replxx::KEY::control('W'), std::bind(&Replxx::invoke, &lineEditor, Replxx::ACTION::KILL_TO_WHITESPACE_ON_LEFT, std::placeholders::_1));
+
+    lineEditor.set_word_break_characters("\t _[]/:'\"=-%");
+
     lineEditor.set_completion_callback([&parser](const std::string& input, int& context) {
         std::stringstream stream;
         auto completions = parser.completeCommand(input, stream);