accept-line accept-and-hold() { if [[ $LASTWIDGET == bracketed-paste ]] && [[ $BUFFER[-1] == $'\n' ]]; then zle .backward-delete-char fi zle .$WIDGET -- "$@" } zle -N accept-line zle -N accept-and-hold # Maybe do the same for the other accept-* widgets. (( $+zle_highlight )) || zle_highlight=() zle_highlight+=( paste:standout )