1
0
Fork 0

#53 add preview of yank-ring item

This commit is contained in:
Andrey Orst 2019-04-08 16:29:42 +03:00
parent 5b2b21b8d3
commit bd3de3a3ad

View file

@ -28,10 +28,10 @@ define-command -hidden fzf-yank-ring %{ evaluate-commands %sh{
done done
message="Swap between items in yank-ring." message="Swap between items in yank-ring."
printf "%s\n" "fzf -kak-cmd %{fzf-yank-ring-set-dquote} -items-cmd %{cat $yanks}" printf "%s\n" "fzf -kak-cmd %{fzf-yank-ring-set-dquote} -items-cmd %{cat $yanks} -preview -preview-cmd %{--preview 'printf \"%s\\\n\" {} | sed \"s/␤/\\\n/g\"'}"
}} }}
define-command -hidden fzf-yank-ring-set-dquote -params 1 %{ define-command -hidden fzf-yank-ring-set-dquote -params 1 %{
set-register dquote %sh{ printf "%s\n" "$1" | sed "s/␤/\n/g;" } set-register dquote %sh{ printf "%s\n" "$1" | sed "s/␤/\n/g" }
} }