jedi.kak: python 3 compat fix

This commit is contained in:
Maxime Coste 2017-02-20 20:13:48 +00:00
parent e2f6b9a393
commit 186eed0906

View File

@ -20,7 +20,7 @@ def jedi-complete -docstring "Complete the current selection" %{
compl=$(python 2> "${dir}/fifo" <<-END
import jedi
script=jedi.Script(open('$dir/buf', 'r').read(), $kak_cursor_line, $kak_cursor_column - 1, '$kak_buffile')
print ':'.join([(str(c.name).replace("|", "\\|") + "|" + str(c.docstring()).replace("|", "\\|")).replace(":", "\\:") + "|" + str(c.name).replace("|", "\\|") for c in script.completions()]).replace("'", r"\\\\'")
print(':'.join([(str(c.name).replace("|", "\\|") + "|" + str(c.docstring()).replace("|", "\\|")).replace(":", "\\:") + "|" + str(c.name).replace("|", "\\|") for c in script.completions()]).replace("'", r"\\\\'"))
END
)
printf %s\\n "${compl}" > /tmp/kak-jedi-out