From 4ce589f9a77cf01e278ac2b25f4cd9a638f15b7f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 20 Feb 2015 18:43:09 +0000 Subject: [PATCH] Fix removing of fifo directories, remove the hook itself once done --- rc/git-tools.kak | 5 ++++- rc/grep.kak | 5 ++++- rc/make.kak | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/rc/git-tools.kak b/rc/git-tools.kak index 38e85390..ecb09683 100644 --- a/rc/git-tools.kak +++ b/rc/git-tools.kak @@ -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 + } }" } diff --git a/rc/grep.kak b/rc/grep.kak index ed710499..76a1f7c1 100644 --- a/rc/grep.kak +++ b/rc/grep.kak @@ -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 + } }" }} diff --git a/rc/make.kak b/rc/make.kak index b48dc684..b2a4381e 100644 --- a/rc/make.kak +++ b/rc/make.kak @@ -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 + } }" }}