Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion configshell/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import os
import sys
from pyparsing import Empty, Group, OneOrMore, Optional, ParseResults, Regex, Suppress, Word
from pyparsing import QuotedString, Or
from pyparsing import alphanums

import configshell.log as log
Expand Down Expand Up @@ -110,7 +111,8 @@ def __init__(self, preferences_dir=None):
# 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*')
Expand Down