Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Cannot use LBUFFER+= nor print -zr from zsh/sched call
- X-seq: zsh-users 21880
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Cannot use LBUFFER+= nor print -zr from zsh/sched call
- Date: Mon, 12 Sep 2016 10:34:08 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=brasslantern-com.20150623.gappssmtp.com; s=20150623;        h=from:message-id:date:in-reply-to:comments:references:to:subject         :mime-version;        bh=C4uJkNi+1lN9Q+BwOYVOK9hx8BXUJkWdUEzk8Qn+wPU=;        b=FjkskW+CRK7x8wIRHwq8e6idEnGQH5KdPbcUTyOCqnvnfMq3TU+lo8tf8HAev1W47Q         MoPixJ8N5TE5D/+Tl/m9z0P+WQhLjLnHLVKFD3k3qRLepKlPKCSpR3A/ZLy8VZ/EkhuB         HCPNu0Mi2PFMVGcZYinQactFiG6c2y3mr+xTW83OyFBf9TeHVRxl2Ggq6b1rk1ZJqkov         vUYWGrLMJ1Fi7y/SlkXNxqN8AeN9wDzcXd92EDhw34jNw0GhhgL904ThjnNGKDfZUKIa         fbg12vduXsd9xZnM2/ba2uTuvimrxi2elkQUypDDTiWuT70YHpFYYNJVfqTjtKLh9Or2         +tOA==
- In-reply-to: <CAKc7PVD11E3zY64_afG0N3KHd8KRj7sgretaJ=9Ecrn5cfOzFg@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVCiy_phpQb=DTR-Td5ktDL2cDK=y_tUE3bTXVXVTm2AXA@mail.gmail.com> 	<CAKc7PVC1UVpC+oax4Wy+SWJamjpa-7xAk4NTuauA1BN1LhfcpQ@mail.gmail.com> 	<160911181347.ZM21403@torch.brasslantern.com> 	<160912080654.ZM24107@torch.brasslantern.com> 	<CAKc7PVD11E3zY64_afG0N3KHd8KRj7sgretaJ=9Ecrn5cfOzFg@mail.gmail.com>
On Sep 12,  5:24pm, Sebastian Gniazdowski wrote:
}
} The ZLE solution you gave is ok, but sched can start without zle == true
Well, yes.  It should be fine to do e.g.:
    if zle; then
      zle -U "${(j.;.)commands}"
    else
      print -zr "${(j.;.)commands}"
    fi
If zle is not yet running, then it's going to start up the very next
thing, and will pop the buffer stack onto the new command line.
If you want an implicit accept-line, then you're going to have to do
something to coordinate with zle-line-init in the "else" branch.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author