Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: transpose-words-match (Re: New widget "transpose-segments")



On 9 January 2016 at 19:18, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> Yes, I'm just not sure it's an *intentional* difference.

Bart there already is "copy-prev-shell-word". It's good to not be
bound to global select-word-style setting. My widget named
"transpose-shell-words" and your simple "backward-kill-shell-word"
(the one for zsh >= 5.0.8) together with "copy-prev-shell-word" would
constitute a nice feature set. And I'm using Daniel's
"backward-kill-shell-word" in my Zew so that all Zsh users, even
before zsh-5.0.8 can be happy

That said I tested your bksw and it doesn't fully work for following
multi-line command:

a=${(j:,:)a}
a="${(r:100000:: _:)a}"
 試句相當長
""
a\ b
c\ b

There is a space after "". When cursor is positioned after this space,
invoking bksw joins lines "" and a\ b instead of deleting "". Daniel's
code works on this. It's not the first time that (z) flags proves its
robustness, but maybe your simpler bksw can be updated to handle this
case?

Best regards,
Sebastian Gniazdowski



Messages sorted by: Reverse Date, Date, Thread, Author