Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bracketed paste
- X-seq: zsh-workers 35795
- From: Yuri D'Elia <wavexx@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: bracketed paste
- Date: Wed, 15 Jul 2015 19:33:13 +0200
- In-reply-to: <mo6325$r5k$1@ger.gmane.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <mo6325$r5k$1@ger.gmane.org>
On 15/07/15 18:51, Yuri D'Elia wrote:
> I'd like to do the same using the final widget if possible.
To give an example, if you still remember the code I posted earlier:
function _end_paste() {
bindkey -e
setopt localoptions extendedglob
_paste_content=${${_paste_content%%[[:space:]]#}##[[:space:]]#}
[[ $_paste_quoted == 1 ]] && LBUFFER+=${(q)_paste_content} || LBUFFER+=$_paste_content
unset _paste_content _paste_quoted
}
And yes, that whitespace trimming looks ugly.
Is there a better way?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author