fix #87
This commit is contained in:
parent
3f2773c919
commit
bfe1bc0a3d
1 changed files with 6 additions and 3 deletions
|
@ -138,10 +138,13 @@ Switches:
|
||||||
fzf -params .. %{ evaluate-commands %sh{
|
fzf -params .. %{ evaluate-commands %sh{
|
||||||
fzf_impl="${kak_opt_fzf_implementation:?}"
|
fzf_impl="${kak_opt_fzf_implementation:?}"
|
||||||
|
|
||||||
|
# trims selection and escapes single quotes
|
||||||
|
selection=$(printf "%s" "${kak_selection:-}" | sed -e "s/^[[:blank:]]*//g;s/[[:blank:]]*$//g;s/'/'\\\\''/g")
|
||||||
|
|
||||||
[ "${kak_opt_fzf_use_main_selection:-}" = "true" ] && \
|
[ "${kak_opt_fzf_use_main_selection:-}" = "true" ] && \
|
||||||
[ "$(printf "%s" "${kak_selection:-}" | wc -m)" -gt 1 ] && \
|
[ "$(printf "%s" "$kak_selection" | wc -m)" -gt 1 ] && \
|
||||||
[ "$(printf "%s" "${kak_selection:-}" | wc -l)" -eq 1 ] && \
|
[ "$(printf "%s\n" "$selection" | wc -l)" -eq 1 ] && \
|
||||||
default_query="-i -q ${kak_selection:-}"
|
default_query="-i -q '$selection'"
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
Loading…
Reference in a new issue