AutoYADM commit: 2025-07-26 13:39:42

This commit is contained in:
Daniel Fichtinger 2025-07-26 13:39:42 -04:00
parent 4045770952
commit a6e608e5f8

View file

@ -50,13 +50,23 @@ define-command regswap -params 2 %{
} }
} }
define-command pastes %{ define-command -docstring %{
evaluate-commands -draft -save-regs '"a|' %{ pastes [<name>]: paste the selection(s) to pastes.sh. Separate selections are appended into one. Resulting URL is printed to *debug* and copied to clipboard.
Arguments:
name optional filename for the paste
} -params 0..1 pastes %{
evaluate-commands -draft -save-regs '"ab|' %{
set-register b %val{bufname}
execute-keys '"ay' execute-keys '"ay'
edit -scratch edit -scratch
set-register | 'ssh pastes.sh 2>/dev/null' set-register | "ssh pastes.sh %arg{1} 2>/dev/null"
execute-keys '"a<a-R>%|<ret>%s\r<ret>d%"ay' execute-keys '"a<a-R>%|<ret>%s\r<ret>d%_"ay'
set-register | "wl-copy -n"
execute-keys '<a-|><ret>'
echo -debug %reg{a} echo -debug %reg{a}
hook -once global WinDisplay %exp{\Q%reg{b}\E} %{
info -title 'pastes.sh' "%reg{a}"
}
delete-buffer delete-buffer
} }
} }