AutoYADM commit: 2025-07-26 13:39:42
This commit is contained in:
parent
4045770952
commit
a6e608e5f8
1 changed files with 14 additions and 4 deletions
|
@ -50,13 +50,23 @@ define-command regswap -params 2 %{
|
|||
}
|
||||
}
|
||||
|
||||
define-command pastes %{
|
||||
evaluate-commands -draft -save-regs '"a|' %{
|
||||
define-command -docstring %{
|
||||
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'
|
||||
edit -scratch
|
||||
set-register | 'ssh pastes.sh 2>/dev/null'
|
||||
execute-keys '"a<a-R>%|<ret>%s\r<ret>d%"ay'
|
||||
set-register | "ssh pastes.sh %arg{1} 2>/dev/null"
|
||||
execute-keys '"a<a-R>%|<ret>%s\r<ret>d%_"ay'
|
||||
set-register | "wl-copy -n"
|
||||
execute-keys '<a-|><ret>'
|
||||
echo -debug %reg{a}
|
||||
hook -once global WinDisplay %exp{\Q%reg{b}\E} %{
|
||||
info -title 'pastes.sh' "%reg{a}"
|
||||
}
|
||||
delete-buffer
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue