AutoYADM commit: 2025-07-09 14:37:26

This commit is contained in:
Daniel Fichtinger 2025-07-09 14:37:26 -04:00
parent ee833820f0
commit f922470828

View file

@ -1,11 +1,13 @@
define-command \
-docstring %{
Insert the date, with the args passed as a string
to date -d
to date -d.
} \
insert-date -params 1.. %{
evaluate-commands -draft -save-regs '|' %{
set-register | "date -d '%arg{@}' -f +%%Y-%%m-%%d"
execute-keys '|<ret>'
insert-date -params 0.. %{
evaluate-commands -draft -save-regs '|"' %{
set-register | "date -d '%arg{@}' '+%%Y-%%m-%%d' | tr -d '\n'"
echo -debug "Inserting date: %reg{pipe}"
# we delete the trailing newline
execute-keys '!<ret>'
}
}