diff --git a/configshell/shell.py b/configshell/shell.py
index bb4dd32..f4caa94 100644
--- a/configshell/shell.py
+++ b/configshell/shell.py
@@ -19,7 +19,8 @@ import os
import six
import sys
from pyparsing import (alphanums, Empty, Group, OneOrMore, Optional,
- ParseResults, Regex, Suppress, Word)
+ ParseResults, Regex, Suppress, Word,
+ QuotedString, Or)
from . import console
from . import log
@@ -119,7 +120,8 @@ class ConfigShell(object):
# Grammar of the command line
command = locatedExpr(Word(alphanums + '_'))('command')
var = Word(alphanums + ';,=_\+/.<>()~@:-%[]')
- value = var
+ qvar = QuotedString('"', unquoteResults=True)
+ value = Or([qvar, var])
keyword = Word(alphanums + '_\-')
kparam = locatedExpr(keyword + Suppress('=') + Optional(value, default=''))('kparams*')
pparam = locatedExpr(var)('pparams*')
Hi,
Could we have opportunity in configshell-fb to pass quoted strings as arguments?
It would be nice to have it. In our software we use whitespace separated arguments
and we also create similar program to targetcli based on configshell. We would like to have compatibility in our code.
Passing such string should work: sample_arg="test test1"
The proposed code would look like this (it is taken from Datera/configshell#2):
Thanks,
Pawel