simplify clang-enable-autocomplete, no need for shell

This commit is contained in:
Maxime Coste 2013-10-31 19:14:44 +00:00
parent 471aeaab9a
commit 5e54705e26

View File

@ -29,10 +29,11 @@ def clang-complete %{
}
def clang-enable-autocomplete %{
hook window -id clang-autocomplete InsertIdle .* %{ eval -draft %{
exec <a-h>
%sh{ [[ $kak_selection =~ .*(\.|->|::).$ ]] && echo "exec <a-space>; eval -client $kak_client echo 'completing...'; clang-complete" }
}}
hook window -id clang-autocomplete InsertIdle .* %{
exec -draft <space><a-h><a-k>(\.|->|::).$<ret>
echo 'completing...'
clang-complete
}
}
def clang-disable-autocomplete %{ rmhooks window clang-autocomplete }