diff --git a/rc/base/ctags.kak b/rc/base/ctags.kak index a4043769..41c18ced 100644 --- a/rc/base/ctags.kak +++ b/rc/base/ctags.kak @@ -44,11 +44,11 @@ If no symbol is passed then the current selection is used as symbol name} \ def tag-complete -docstring "Insert completion candidates for the current selection into the buffer's local variables" %{ eval -draft %{ exec hb^\w+$ - %sh{ ( + %sh{ { compl=$(readtags -p "$kak_selection" | cut -f 1 | sort | uniq | sed -e 's/:/\\:/g' | sed -e 's/\n/:/g' ) compl="${kak_cursor_line}.${kak_cursor_column}+${#kak_selection}@${kak_timestamp}:${compl}" printf %s\\n "set buffer=$kak_bufname ctags_completions '${compl}'" | kak -p ${kak_session} - ) > /dev/null 2>&1 < /dev/null & } + } > /dev/null 2>&1 < /dev/null & } }} def ctags-funcinfo -docstring "Display ctags information about a selected function" %{ @@ -77,7 +77,7 @@ decl str ctagspaths "." def ctags-generate -docstring 'Generate tag file asynchronously' %{ echo -color Information "launching tag generation in the background" - %sh{ ( + %sh{ { while ! mkdir .tags.kaklock 2>/dev/null; do sleep 1; done trap 'rmdir .tags.kaklock' EXIT @@ -89,11 +89,11 @@ def ctags-generate -docstring 'Generate tag file asynchronously' %{ fi printf %s\\n "eval -client $kak_client echo -color Information '${msg}'" | kak -p ${kak_session} - ) > /dev/null 2>&1 < /dev/null & } + } > /dev/null 2>&1 < /dev/null & } } def update-tags -docstring 'Update tags for the given file' %{ - %sh{ ( + %sh{ { while ! mkdir .tags.kaklock 2>/dev/null; do sleep 1; done trap 'rmdir .tags.kaklock' EXIT @@ -109,5 +109,5 @@ def update-tags -docstring 'Update tags for the given file' %{ fi printf %s\\n "eval -client $kak_client echo -color Information '${msg}'" | kak -p ${kak_session} - ) > /dev/null 2>&1 < /dev/null & } + } > /dev/null 2>&1 < /dev/null & } }