zsh-users
 help / color / mirror / code / Atom feed
* Select Whole, When There are Multiple Lines
@ 2021-09-25 11:29 Ahmad Ismail
  2021-09-26  7:08 ` Daniel Shahaf
  0 siblings, 1 reply; 4+ messages in thread
From: Ahmad Ismail @ 2021-09-25 11:29 UTC (permalink / raw)
  To: Zsh Users

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-27  8:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-25 11:29 Select Whole, When There are Multiple Lines Ahmad Ismail
2021-09-26  7:08 ` Daniel Shahaf
2021-09-27  7:17   ` Ahmad Ismail
2021-09-27  8:40     ` Ahmad Ismail

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).