fix #27
This commit is contained in:
parent
6b49595ffc
commit
ec107f4c49
1 changed files with 7 additions and 2 deletions
|
@ -12,6 +12,11 @@ map global fzf -docstring "open buffer" 'b' '<esc>: fzf-buffer<ret>'
|
||||||
|
|
||||||
define-command -hidden fzf-buffer %{ evaluate-commands %sh{
|
define-command -hidden fzf-buffer %{ evaluate-commands %sh{
|
||||||
printf "%s\n" "info -title %{fzf buffer} %{Set buffer to edit in current client.}"
|
printf "%s\n" "info -title %{fzf buffer} %{Set buffer to edit in current client.}"
|
||||||
buffers=$(printf "%s\n" "$kak_buflist" | sed "s/^'//;s/'$/\n/;s/' '/\n/g")
|
buffers=$(mktemp ${TMPDIR:-/tmp}/kak-fzf-buffers.XXXXXX)
|
||||||
printf "%s\n" "fzf %{buffer} %{printf \"%s\n\" \"$buffers\"}"
|
eval "set -- $kak_buflist"
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
printf "%s\n" "$1" >> $buffers
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
printf "%s\n" "fzf %{buffer} %{(cat $buffers; rm $buffers)}"
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Reference in a new issue