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

Select Whole, When There are Multiple Lines



Hi,

I am using the following to select the whole line.

_select-whole-line() {
zle beginning-of-line
((REGION_ACTIVE)) || zle set-mark-command
zle end-of-line
}
zle -N _select-whole-line
bindkey '^A' _select-whole-line # Paste

It works well when there is a single line.

But when the prompt looks like:
....
% the_command established fact that a reader will
be distracted by the readable content of a page whe
n looking at its layout. The point of using Lorem Ips
um is that it has a more-or-less normal distributi
....

I mean when there are multiple lines on the prompt, the keybinding
only works for the line where the cursor is. How can I select all
lines using ctrl-A

Thanks and Best Regards,
Ahmad Ismail




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