AutoYADM commit: 2025-06-09 14:13:22

This commit is contained in:
Daniel Fichtinger 2025-06-09 14:13:22 -04:00
parent 13998f3066
commit 654ea26909

View file

@ -22,13 +22,12 @@ define-command -docstring %{
set-option local clip_selcount %val{selection_count}
# copy selections
execute-keys '"ay'
# disposable buffer
edit -scratch
# set shell register to copy command
set-register | %opt{clipboard_copy_cmd}
# branch based on switch
execute-keys %sh{
if [ "$kak_opt_clip_selcount" -gt 1 ]; then
echo ': edit -scratch<ret>'
if [ ${#} = 1 ] && [ ${1} = '-split' ]; then
# paste all
# reduce selections to those without newline
@ -42,12 +41,11 @@ define-command -docstring %{
# paste all, select all, pipe to copy cmd
echo '"a<a-P>%<a-|><ret>'
fi
echo ": delete-buffer<ret>"
else
echo '<a-|><ret>'
fi
}
# clean up
# delete-buffer
}
}