diff options
author | Christophe Vu-Brugier <cvubrugier@fastmail.fm> | 2015-11-15 11:46:33 +0100 |
---|---|---|
committer | Christophe Vu-Brugier <cvubrugier@fastmail.fm> | 2015-11-15 11:46:33 +0100 |
commit | 81aec249488b7183bea9ddc110bfcfd57524463f (patch) | |
tree | d2f9c8862cb3c9f489d52a1afc799b976fbe5ec1 | |
parent | a9c50f07d6608b08e4a59fdad1be61d79b6454c9 (diff) | |
download | configshell-fb-81aec249488b7183bea9ddc110bfcfd57524463f.tar.gz |
Fix completion of IPv6 portals
Allow square brackets in parameters and remove them from readline's
set_completer_delims() so that readline does not remove the square
brackets from the "text" argument in _complete_token_pparam()
This patch fixes issue #20.
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
-rw-r--r-- | configshell/shell.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/configshell/shell.py b/configshell/shell.py index 0cf6141..32701ec 100644 --- a/configshell/shell.py +++ b/configshell/shell.py @@ -107,7 +107,7 @@ class ConfigShell(object): # Grammar of the command line command = locatedExpr(Word(alphanums + '_'))('command') - var = Word(alphanums + '_\+/.<>()~@:-%]') + var = Word(alphanums + '_\+/.<>()~@:-%[]') value = var keyword = Word(alphanums + '_\-') kparam = locatedExpr(keyword + Suppress('=') + Optional(value, default=''))('kparams*') @@ -122,7 +122,7 @@ class ConfigShell(object): self._parser = parser if tty: - readline.set_completer_delims('\t\n ~!#$^&()[{]}\|;\'",?') + readline.set_completer_delims('\t\n ~!#$^&(){}\|;\'",?') readline.set_completion_display_matches_hook( self._display_completions) |