Do not use eval for grepcmd, as it will evaluate \ escapes as well

This commit is contained in:
Maxime Coste 2013-11-14 00:07:14 +00:00
parent 6adf6f3e29
commit 323997041d

View File

@ -6,9 +6,9 @@ def -shell-params -file-completion \
output=$(mktemp -d -t kak-grep.XXXXXXXX)/fifo
mkfifo ${output}
if (( $# > 0 )); then
( eval ${kak_opt_grepcmd} "$@" | tr -d '\r' >& ${output} ) >& /dev/null < /dev/null &
( ${kak_opt_grepcmd} "$@" | tr -d '\r' >& ${output} ) >& /dev/null < /dev/null &
else
( eval ${kak_opt_grepcmd} "${kak_selection}" | tr -d '\r' >& ${output} ) >& /dev/null < /dev/null &
( ${kak_opt_grepcmd} "${kak_selection}" | tr -d '\r' >& ${output} ) >& /dev/null < /dev/null &
fi
[[ -n "$kak_opt_toolsclient" ]] && echo "eval -client '$kak_opt_toolsclient' %{"