It looks like pyreadline doesn't properly handle a parenthesis when using readline.get_begidx() and readline.get_endidx(). This manifests when trying to tab complete an option that contain a parenthesis, ex:
# Create a new macro with a paren
macro test(
Beginning macro, use the 'end' command to save.
> echo hello world
> end
# tab complete showing them
macro --show test(<TAB> # all macros will be tab completed
The problem for us is inside shell.py:complete():
# begidx and endidx are set to the same,
# so prefix is set to an empty string and passed to the completer
begidx = readline.get_begidx()
endidx = readline.get_endidx()
line = readline.get_line_buffer()
prefix = line[begidx:endidx] if line else ''
line = line[:endidx]
self.completion_matches = self.get_completions(line, prefix)
It looks like pyreadline doesn't properly handle a parenthesis when using
readline.get_begidx()andreadline.get_endidx(). This manifests when trying to tab complete an option that contain a parenthesis, ex:The problem for us is inside
shell.py:complete():