Demo for query storing
Change-Id: I947bcac841992c3f6cfd01ab337c265b0d01cb70
diff --git a/node_modules/coa/lib/shell.js b/node_modules/coa/lib/shell.js
new file mode 100644
index 0000000..3f510e9
--- /dev/null
+++ b/node_modules/coa/lib/shell.js
@@ -0,0 +1,14 @@
+module.exports = { escape, unescape };
+
+function unescape(w) {
+ w = w.charAt(0) === '"'
+ ? w.replace(/^"|([^\\])"$/g, '$1')
+ : w.replace(/\\ /g, ' ');
+
+ return w.replace(/\\("|'|\$|`|\\)/g, '$1');
+}
+
+function escape(w) {
+ w = w.replace(/(["'$`\\])/g,'\\$1');
+ return w.match(/\s+/) ? `"${w}"` : w;
+}