Commit 00a99483 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

[1345] remove - from word boundaries in readline if present

parent d5ade3d3
......@@ -109,6 +109,18 @@ class BindCmdInterpreter(Cmd):
else:
self.csv_file_dir = pwd.getpwnam(getpass.getuser()).pw_dir + \
os.sep + '.bind10' + os.sep
self._update_readline_word_boundary()
def _update_readline_word_boundary(self):
# This is a fix for the problem described in
# http://bind10.isc.org/ticket/1345
# If '-' is seen as a word-boundary, the final completion-step
# (as handled by the cmd module, and hence outside our reach) can
# mistakenly add data twice, resulting in wrong completion results
# The solution is to remove it.
delims = readline.get_completer_delims( )
delims = delims.replace('-', '')
readline.set_completer_delims(delims)
def _get_session_id(self):
'''Generate one session id for the connection. '''
......@@ -507,14 +519,12 @@ class BindCmdInterpreter(Cmd):
hints = []
self.hint = hints
#self._append_space_to_hint()
if state < len(self.hint):
return self.hint[state]
else:
return None
def _get_module_startswith(self, text):
return [module
for module in self.modules
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment