Use eval ${kak_opt_(make|grep}cmd} in (make|grep).kak
Quotes in the variable are preserved that way.
This commit is contained in:
parent
414a1332eb
commit
b4cc8edd35
|
@ -6,9 +6,9 @@ def -shell-params -file-completion \
|
||||||
output=$(mktemp -d -t kak-grep.XXXXXXXX)/fifo
|
output=$(mktemp -d -t kak-grep.XXXXXXXX)/fifo
|
||||||
mkfifo ${output}
|
mkfifo ${output}
|
||||||
if (( $# > 0 )); then
|
if (( $# > 0 )); then
|
||||||
( ${kak_opt_grepcmd} "$@" | tr -d '\r' >& ${output} ) >& /dev/null < /dev/null &
|
( eval ${kak_opt_grepcmd} "$@" | tr -d '\r' >& ${output} ) >& /dev/null < /dev/null &
|
||||||
else
|
else
|
||||||
( ${kak_opt_grepcmd} "${kak_selection}" | tr -d '\r' >& ${output} ) >& /dev/null < /dev/null &
|
( eval ${kak_opt_grepcmd} "${kak_selection}" | tr -d '\r' >& ${output} ) >& /dev/null < /dev/null &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -n "$kak_opt_toolsclient" ]] && echo "eval -client '$kak_opt_toolsclient' %{"
|
[[ -n "$kak_opt_toolsclient" ]] && echo "eval -client '$kak_opt_toolsclient' %{"
|
||||||
|
|
|
@ -4,7 +4,7 @@ decl str toolsclient
|
||||||
def -shell-params make %{ %sh{
|
def -shell-params make %{ %sh{
|
||||||
output=$(mktemp -d -t kak-make.XXXXXXXX)/fifo
|
output=$(mktemp -d -t kak-make.XXXXXXXX)/fifo
|
||||||
mkfifo ${output}
|
mkfifo ${output}
|
||||||
( ${kak_opt_makecmd} $@ >& ${output} ) >& /dev/null < /dev/null &
|
( eval ${kak_opt_makecmd} $@ >& ${output} ) >& /dev/null < /dev/null &
|
||||||
|
|
||||||
[[ -n "$kak_opt_toolsclient" ]] && echo "eval -client '$kak_opt_toolsclient' %{"
|
[[ -n "$kak_opt_toolsclient" ]] && echo "eval -client '$kak_opt_toolsclient' %{"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user