Fix removing of fifo directories, remove the hook itself once done

This commit is contained in:
Maxime Coste 2015-02-20 18:43:09 +00:00
parent 8df77121d7
commit 4ce589f9a7
3 changed files with 12 additions and 3 deletions

View File

@ -48,7 +48,10 @@ def -shell-params \
echo "eval -try-client '$kak_opt_docsclient' %{
edit! -fifo ${output} *git*
set buffer filetype '${filetype}'
hook buffer BufCloseFifo .* %{ nop %sh{ rm -r $(dirname ${output}) } }
hook -group fifo buffer BufCloseFifo .* %{
nop %sh{ rm -r $(dirname ${output}) }
rmhooks buffer fifo
}
}"
}

View File

@ -16,7 +16,10 @@ def -shell-params -file-completion \
edit! -fifo ${output} -scroll *grep*
set buffer filetype grep
set buffer _grep_current_line 0
hook buffer BufCloseFifo .* %{ nop %sh{ rm -r $(dirname ${output}) } }
hook -group fifo buffer BufCloseFifo .* %{
nop %sh{ rm -r $(dirname ${output}) }
rmhooks buffer fifo
}
}"
}}

View File

@ -11,7 +11,10 @@ def -shell-params make %{ %sh{
edit! -fifo ${output} -scroll *make*
set buffer filetype make
set buffer _make_current_error_line 0
hook buffer BufCloseFifo .* %{ nop %sh{ rm -r $(dirname ${output}) } }
hook -group fifo buffer BufCloseFifo .* %{
nop %sh{ rm -r $(dirname ${output}) }
rmhooks buffer fifo
}
}"
}}