Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Select Whole, When There are Multiple Lines
- X-seq: zsh-users 27133
- From: Ahmad Ismail <ismail783@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Select Whole, When There are Multiple Lines
- Date: Sat, 25 Sep 2021 17:29:59 +0600
- Archived-at: <https://zsh.org/users/27133>
- List-id: <zsh-users.zsh.org>
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