X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=a1853f354790032ff01df1f940004b016762f3b8;hb=9db2fa1ad20f847e0162a3845ac5d7d450298b10;hp=430d9a78570a602bbf8f3034b2a29876cacdbce8;hpb=8cfa1ca76d4164182c26653c8237733cbe995324;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 430d9a7..a1853f3 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -906,11 +906,11 @@ if is4 && [[ -n ${(k)modules[zsh/complist]} ]] ; then fi # press "ctrl-e d" to insert the actual date in the form yyyy-mm-dd -_bkdate() { BUFFER="$BUFFER$(date '+%F')"; CURSOR=$#BUFFER; } -zle -N _bkdate +insert-datestamp() { LBUFFER+=${(%):-'%D{%Y-%m-%d}'}; } +zle -N insert-datestamp #k# Insert a timestamp on the command line (yyyy-mm-dd) -bindkey '^Ed' _bkdate +bindkey '^Ed' insert-datestamp # press esc-m for inserting last typed word again (thanks to caphuso!) insert-last-typed-word() { zle insert-last-word -- 0 -1 };