diff --git a/.config/kak/autoload/util.kak b/.config/kak/autoload/util.kak index 30daf9e2..8a0e76af 100644 --- a/.config/kak/autoload/util.kak +++ b/.config/kak/autoload/util.kak @@ -1,13 +1,15 @@ define-command \ -docstring %{ - Insert the date, with the args passed as a string - to date -d. + Replace the selections with the date, with the args passed as a + string to date -d. } \ 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 '!' + execute-keys '|' } } + +alias global date insert-date