Its not essential but it bugs me a bit, here is the fragment from my .zshrc
a function/widget called add_sudo, that will go at the beginning of line, writes sudo there and then should go at the end of the line.
Its bind to ctrl+f
But it does not go at the end of the line, it ignores last command and sits there after it wrote sudo.
add_sudo() {
zle beginning-of-line;
zle -U "sudo ";
zle end-of-line;
}
zle -N add_sudo
bindkey "^f" add_sudo
any solution to this?