Don't create subshells when unnecessary

This commit is contained in:
codesoap 2019-06-09 13:24:30 +02:00
parent 009eb80ca0
commit 6c05e6e0f8
4 changed files with 6 additions and 6 deletions

View File

@ -36,7 +36,7 @@ The syntaxic errors detected during parsing are shown when auto-diagnostics are
# not hang while clang is running. As completions references a cursor
# position and a buffer timestamp, only valid completions should be
# displayed.
{(
{{
case ${kak_opt_filetype} in
c) ft=c ;;
cpp) ft=c++ ;;
@ -100,7 +100,7 @@ The syntaxic errors detected during parsing are shown when auto-diagnostics are
printf %s\\n "set-option 'buffer=${kak_buffile}' clang_flags ${kak_timestamp} ${flags}
set-option 'buffer=${kak_buffile}' clang_errors ${kak_timestamp} ${errors}" | kak -p ${kak_session}
) & } > /dev/null 2>&1 < /dev/null
} & } > /dev/null 2>&1 < /dev/null
}
}

View File

@ -45,7 +45,7 @@ Available commands:\n add\n rm\n blame\n commit\n checkout\n diff\n hide-
esac
output=$(mktemp -d "${TMPDIR:-/tmp}"/kak-git.XXXXXXXX)/fifo
mkfifo ${output}
( git "$@" > ${output} 2>&1 & ) > /dev/null 2>&1 < /dev/null
{ git "$@" > ${output} 2>&1 & } > /dev/null 2>&1 < /dev/null
printf %s "evaluate-commands -try-client '$kak_opt_docsclient' %{
edit! -fifo ${output} *git*

View File

@ -11,9 +11,9 @@ All the optional arguments are forwarded to the grep utility} \
output=$(mktemp -d "${TMPDIR:-/tmp}"/kak-grep.XXXXXXXX)/fifo
mkfifo ${output}
if [ $# -gt 0 ]; then
( ${kak_opt_grepcmd} "$@" | tr -d '\r' > ${output} 2>&1 & ) > /dev/null 2>&1 < /dev/null
{ ${kak_opt_grepcmd} "$@" | tr -d '\r' > ${output} 2>&1 & } > /dev/null 2>&1 < /dev/null
else
( ${kak_opt_grepcmd} "${kak_selection}" | tr -d '\r' > ${output} 2>&1 & ) > /dev/null 2>&1 < /dev/null
{ ${kak_opt_grepcmd} "${kak_selection}" | tr -d '\r' > ${output} 2>&1 & } > /dev/null 2>&1 < /dev/null
fi
printf %s\\n "evaluate-commands -try-client '$kak_opt_toolsclient' %{

View File

@ -13,7 +13,7 @@ All the optional arguments are forwarded to the make utility} \
make %{ evaluate-commands %sh{
output=$(mktemp -d "${TMPDIR:-/tmp}"/kak-make.XXXXXXXX)/fifo
mkfifo ${output}
( eval ${kak_opt_makecmd} "$@" > ${output} 2>&1 & ) > /dev/null 2>&1 < /dev/null
{ eval ${kak_opt_makecmd} "$@" > ${output} 2>&1 & } > /dev/null 2>&1 < /dev/null
printf %s\\n "evaluate-commands -try-client '$kak_opt_toolsclient' %{
edit! -fifo ${output} -scroll *make*