Cleanup WIP clang-show-completion-info

This commit is contained in:
Maxime Coste 2015-11-26 13:35:03 +00:00
parent 9e08cf8ea4
commit bf7d3a4fec

View File

@ -148,12 +148,12 @@ def clang-diagnostics-next -docstring "Jump to the next line that contains an er
} } } }
def -allow-override -hidden clang-show-completion-info %[ def -allow-override -hidden clang-show-completion-info %[
eval -draft %[ eval -draft %[
exec '{(b' exec '{(b'
%sh[ %sh[
msg=$(echo "${kak_opt_clang_completions}" | sed -e 's/\([^\\]\):/\1\n/g' ) msg=$(echo "${kak_opt_clang_completions}" | sed -e 's/\([^\\]\):/\1\n/g' )
echo "echo -debug -- %{$msg}" echo "echo -debug -- %{$msg}"
desc=$(echo "${kak_opt_clang_completions}" | sed -e 's/\([^\\]\):/\1\n/g' | grep "^${kak_selection}@" | head -n1 | sed -e 's/.*[^\\]@\(.*[^\\]\)@.*$/\1/' ) desc=$(echo "${kak_opt_clang_completions}" | sed -e 's/\([^\\]\):/\1\n/g' | grep "^${kak_selection}@" | head -n1 | sed -e 's/.*[^\\]@\(.*[^\\]\)@.*$/\1/' )
echo "eval -client $kak_client info -anchor ${kak_cursor_line}.${kak_cursor_column} ${desc}" echo "eval -client $kak_client info -anchor ${kak_cursor_line}.${kak_cursor_column} ${desc}"
] ] ] ]
] ]