Commit 6fe48ea5 authored by Screwtape's avatar Screwtape

Display a message in the original client when the cargo command completes.

While we're here, also update the code to use "hook -once" instead of
making the hook remove itself, and using "nop" instead of "eval" and hoping
that rm prints nothing to stdout.
parent 08ff718a
......@@ -22,9 +22,11 @@ All the optional arguments are forwarded to the cargo utility} \
edit! -fifo ${output} -scroll *cargo*
set-option buffer filetype cargo
set-option buffer cargo_current_error_line 1
hook -group fifo buffer BufCloseFifo .* %{
evaluate-commands %sh{ rm -r $(dirname ${output}) }
remove-hooks buffer fifo
hook -once buffer BufCloseFifo .* %{
nop %sh{ rm -r $(dirname ${output}) }
evaluate-commands -try-client '$kak_client' %{
echo -- Completed cargo $*
}
}
}"
}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment