Don't double sub shell

This commit is contained in:
Dimitar Dimitrov 2016-10-31 09:13:53 +00:00 committed by Maxime Coste
parent f1400e49ab
commit 27265b655a

View File

@ -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 <space>hb<a-k>^\w+$<ret>
%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 & }
}