From 869736359a4b72609327e4f0b9f2c3682f5cce8a Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 26 Apr 2018 08:30:01 +1000 Subject: [PATCH] Make all fifo cleanup hooks run always Those should not get prevented from running just because the user disabled hooks, they are important for cleanup. --- rc/base/lint.kak | 2 +- rc/core/grep.kak | 2 +- rc/core/make.kak | 2 +- rc/extra/clang.kak | 2 +- rc/extra/git-tools.kak | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rc/base/lint.kak b/rc/base/lint.kak index 41ad1144..574e646a 100644 --- a/rc/base/lint.kak +++ b/rc/base/lint.kak @@ -16,7 +16,7 @@ define-command lint -docstring 'Parse the current buffer with a linter' %{ edit! -fifo $dir/fifo -debug *lint-output* set-option buffer filetype make set-option buffer make_current_error_line 0 - hook -group fifo buffer BufCloseFifo .* %{ + hook -always -group fifo buffer BufCloseFifo .* %{ nop %sh{ rm -r '$dir' } remove-hooks buffer fifo } diff --git a/rc/core/grep.kak b/rc/core/grep.kak index e0697d70..4b861900 100644 --- a/rc/core/grep.kak +++ b/rc/core/grep.kak @@ -20,7 +20,7 @@ All the optional arguments are forwarded to the grep utility} \ edit! -fifo ${output} -scroll *grep* set-option buffer filetype grep set-option buffer grep_current_line 0 - hook -group fifo buffer BufCloseFifo .* %{ + hook -always -group fifo buffer BufCloseFifo .* %{ nop %sh{ rm -r $(dirname ${output}) } remove-hooks buffer fifo } diff --git a/rc/core/make.kak b/rc/core/make.kak index 193eb8f0..62c0881a 100644 --- a/rc/core/make.kak +++ b/rc/core/make.kak @@ -19,7 +19,7 @@ All the optional arguments are forwarded to the make utility} \ edit! -fifo ${output} -scroll *make* set-option buffer filetype make set-option buffer make_current_error_line 0 - hook -group fifo buffer BufCloseFifo .* %{ + hook -always -group fifo buffer BufCloseFifo .* %{ nop %sh{ rm -r $(dirname ${output}) } remove-hooks buffer fifo } diff --git a/rc/extra/clang.kak b/rc/extra/clang.kak index 46035879..6e825266 100644 --- a/rc/extra/clang.kak +++ b/rc/extra/clang.kak @@ -24,7 +24,7 @@ The syntaxic errors detected during parsing are shown when auto-diagnostics are edit! -fifo ${dir}/fifo -debug *clang-output* set-option buffer filetype make set-option buffer make_current_error_line 0 - hook -group fifo buffer BufCloseFifo .* %{ + hook -always -group fifo buffer BufCloseFifo .* %{ nop %sh{ rm -r ${dir} } remove-hooks buffer fifo } diff --git a/rc/extra/git-tools.kak b/rc/extra/git-tools.kak index 30871ae3..05c6981b 100644 --- a/rc/extra/git-tools.kak +++ b/rc/extra/git-tools.kak @@ -53,7 +53,7 @@ Available commands:\n add\n rm\n blame\n commit\n checkout\n diff\n hide- printf %s "evaluate-commands -with-hooks -try-client '$kak_opt_docsclient' %{ edit! -fifo ${output} *git* set-option buffer filetype '${filetype}' - hook -group fifo buffer BufCloseFifo .* %{ + hook -always -group fifo buffer BufCloseFifo .* %{ nop %sh{ rm -r $(dirname ${output}) } remove-hooks buffer fifo }