Merge branch 'master' into extended_tags
This commit is contained in:
commit
5ec7ca4bb9
1 changed files with 3 additions and 3 deletions
|
@ -303,7 +303,7 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{
|
|||
if [ ! -z "${kak_client_env_TMUX}" ]; then
|
||||
preview_pos='pos=right:50%;'
|
||||
else
|
||||
preview_pos='sleep 0.1; if [ $(tput cols) -gt $(expr $(tput lines) * 2) ]; then pos=right:50%; else pos=top:60%; fi;'
|
||||
preview_pos='sleep 0.1; if [ \$(tput cols) -gt \$(expr \$(tput lines) \* 2) ]; then pos=right:50%; else pos=top:60%; fi;'
|
||||
fi
|
||||
additional_flags="--preview '($highlighter || cat {}) 2>/dev/null | head -n $kak_opt_fzf_preview_lines' --preview-window=\$pos $additional_flags"
|
||||
fi
|
||||
|
@ -313,9 +313,9 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{
|
|||
cmd="$preview_pos $items_command | fzf-tmux -d $kak_opt_fzf_tmux_height --expect ctrl-q $additional_flags > $tmp"
|
||||
elif [ ! -z "${kak_opt_termcmd}" ]; then
|
||||
path=$(pwd)
|
||||
additional_flags=$(echo $additional_flags | sed "s:\$pos:\\\\\$pos:")
|
||||
additional_flags=$(echo $additional_flags | sed 's:\$pos:\\\\\\\$pos:')
|
||||
[ -z "${items_command##*Q*}" ] && items_command=$(echo $items_command | sed 's:$kind \(\w\):\\\\\\$kind \\\\\\\"\1\\\\\\\":')
|
||||
cmd="$kak_opt_termcmd \"sh -c \\\"cd $path && $preview_pos $items_command | fzf --expect ctrl-q $additional_flags > $tmp\\\"\""
|
||||
cmd="$kak_opt_termcmd \"sh -c \\\"sh=$(command -v sh); SHELL=\\\$sh; export SHELL; cd $path && $preview_pos $items_command | fzf --expect ctrl-q $additional_flags > $tmp\\\"\"
|
||||
else
|
||||
echo "fail termcmd option is not set"
|
||||
exit
|
||||
|
|
Loading…
Reference in a new issue