Use -once hooks to remove fifo directories
This commit is contained in:
parent
2e138c835a
commit
1485150b68
|
@ -28,10 +28,7 @@ define-command lint -docstring 'Parse the current buffer with a linter' %{
|
||||||
edit! -fifo $dir/fifo -debug *lint-output*
|
edit! -fifo $dir/fifo -debug *lint-output*
|
||||||
set-option buffer filetype make
|
set-option buffer filetype make
|
||||||
set-option buffer make_current_error_line 0
|
set-option buffer make_current_error_line 0
|
||||||
hook -always -group fifo buffer BufCloseFifo .* %{
|
hook -always -once buffer BufCloseFifo .* %{ nop %sh{ rm -r '$dir' } }
|
||||||
nop %sh{ rm -r '$dir' }
|
|
||||||
remove-hooks buffer fifo
|
|
||||||
}
|
|
||||||
}"
|
}"
|
||||||
|
|
||||||
{ # do the parsing in the background and when ready send to the session
|
{ # do the parsing in the background and when ready send to the session
|
||||||
|
|
|
@ -20,10 +20,7 @@ All the optional arguments are forwarded to the grep utility} \
|
||||||
edit! -fifo ${output} -scroll *grep*
|
edit! -fifo ${output} -scroll *grep*
|
||||||
set-option buffer filetype grep
|
set-option buffer filetype grep
|
||||||
set-option buffer grep_current_line 0
|
set-option buffer grep_current_line 0
|
||||||
hook -always -group fifo buffer BufCloseFifo .* %{
|
hook -always -once buffer BufCloseFifo .* %{ nop %sh{ rm -r $(dirname ${output}) } }
|
||||||
nop %sh{ rm -r $(dirname ${output}) }
|
|
||||||
remove-hooks buffer fifo
|
|
||||||
}
|
|
||||||
}"
|
}"
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,7 @@ All the optional arguments are forwarded to the make utility} \
|
||||||
edit! -fifo ${output} -scroll *make*
|
edit! -fifo ${output} -scroll *make*
|
||||||
set-option buffer filetype make
|
set-option buffer filetype make
|
||||||
set-option buffer make_current_error_line 0
|
set-option buffer make_current_error_line 0
|
||||||
hook -always -group fifo buffer BufCloseFifo .* %{
|
hook -always -once buffer BufCloseFifo .* %{ nop %sh{ rm -r $(dirname ${output}) } }
|
||||||
nop %sh{ rm -r $(dirname ${output}) }
|
|
||||||
remove-hooks buffer fifo
|
|
||||||
}
|
|
||||||
}"
|
}"
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,7 @@ The syntaxic errors detected during parsing are shown when auto-diagnostics are
|
||||||
edit! -fifo ${dir}/fifo -debug *clang-output*
|
edit! -fifo ${dir}/fifo -debug *clang-output*
|
||||||
set-option buffer filetype make
|
set-option buffer filetype make
|
||||||
set-option buffer make_current_error_line 0
|
set-option buffer make_current_error_line 0
|
||||||
hook -always -group fifo buffer BufCloseFifo .* %{
|
hook -once -always buffer BufCloseFifo .* %{ nop %sh{ rm -r ${dir} } }
|
||||||
nop %sh{ rm -r ${dir} }
|
|
||||||
remove-hooks buffer fifo
|
|
||||||
}
|
|
||||||
}"
|
}"
|
||||||
# this runs in a detached shell, asynchronously, so that kakoune does
|
# this runs in a detached shell, asynchronously, so that kakoune does
|
||||||
# not hang while clang is running. As completions references a cursor
|
# not hang while clang is running. As completions references a cursor
|
||||||
|
|
|
@ -53,10 +53,7 @@ Available commands:\n add\n rm\n blame\n commit\n checkout\n diff\n hide-
|
||||||
printf %s "evaluate-commands -try-client '$kak_opt_docsclient' %{
|
printf %s "evaluate-commands -try-client '$kak_opt_docsclient' %{
|
||||||
edit! -fifo ${output} *git*
|
edit! -fifo ${output} *git*
|
||||||
set-option buffer filetype '${filetype}'
|
set-option buffer filetype '${filetype}'
|
||||||
hook -always -group fifo buffer BufCloseFifo .* %{
|
hook -always -once buffer BufCloseFifo .* %{ nop %sh{ rm -r $(dirname ${output}) } }
|
||||||
nop %sh{ rm -r $(dirname ${output}) }
|
|
||||||
remove-hooks buffer fifo
|
|
||||||
}
|
|
||||||
}"
|
}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user