From d7a31f89832c6b9dc34d3326ebe895aabb8bdba1 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 19 Nov 2014 13:54:36 +0000 Subject: [PATCH] jedi.kak: remove the tmp dir directly in the %sh block --- rc/jedi.kak | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/rc/jedi.kak b/rc/jedi.kak index d3e4a2c8..bde0049e 100644 --- a/rc/jedi.kak +++ b/rc/jedi.kak @@ -10,13 +10,7 @@ def jedi-complete %{ } %sh{ dir=${kak_opt_jedi_tmp_dir} - echo "eval -draft %{ - edit! -fifo ${dir}/fifo *jedi-output* - hook -group jedi-cleanup buffer BufCloseFifo .* %{ - nop %sh{ rm -r ${dir} } - rmhooks buffer jedi-cleanup - } - }" + echo "eval -draft %{ edit! -fifo ${dir}/fifo *jedi-output* }" ( cd $(dirname ${kak_buffile}) header="${kak_cursor_line}.${kak_cursor_column}@${kak_timestamp}" @@ -27,8 +21,8 @@ def jedi-complete %{ print ':'.join([str(c.name) + "@" + str(c.description).replace(":", "\\:") for c in script.completions()]) END ) - echo "eval -client ${kak_client} %[ echo completed; set 'buffer=${kak_buffile}' jedi_completions %[${header}:${compl}] ]" | kak -p ${kak_session} + rm -r ${dir} ) > /dev/null 2>&1 < /dev/null & } }