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
|
||||
mkfifo ${output}
|
||||
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
|
||||
( ${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
|
||||
|
||||
[[ -n "$kak_opt_toolsclient" ]] && echo "eval -client '$kak_opt_toolsclient' %{"
|
||||
|
|
|
@ -4,7 +4,7 @@ decl str toolsclient
|
|||
def -shell-params make %{ %sh{
|
||||
output=$(mktemp -d -t kak-make.XXXXXXXX)/fifo
|
||||
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' %{"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user