Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Howto to print ENTER to zle-buffer?
- X-seq: zsh-users 22215
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Howto to print ENTER to zle-buffer?
- Date: Tue, 13 Dec 2016 09:30:08 -0800
- 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=7W6r9GahqUCCqqWVB6oV8hsdrlVaKVzq44J8a9/ooSw=; b=Qt/Adyn92BeubLVmlBENi7NGTo+QXIC4AFcnKnw/z3WoCnhoPyshY7Krr1D3iJFNqo 2hRSX0COkgIALm4ew8acCRyeXZnwsuggW6KxRbjKXauUiDzs6FQq0kpUfW50Q8pavVLQ DXwLj+yej3laFW6EWOYFPuXB1PtmJ1pAK3K4C2Cb3oiH0QMvo6kjNnffDbEnVJojQkhV E4Pd+7/brD3he67dokg2PnwOlxC7wqwBcRmWy7OHv85IaGUlO5T1te9RBJK8sNpBAabj wKgm7F6mchLCAmHeV/tkKr/9H+TUp1xsizrrk4QYJNOd2aJnBzIhASC5/81XX+2P4pop La6w==
- In-reply-to: <20161213164749.5gfrgorfe2ad4edr@spiegl.de>
- 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: <20161213150101.lgcl6r44gc5b4sia@spiegl.de> <161213081230.ZM21776@torch.brasslantern.com> <20161213164749.5gfrgorfe2ad4edr@spiegl.de>
On Dec 13, 5:47pm, Andy Spiegl wrote:
}
} > If for some reason you really need the command executed within ZLE,
} Actually, yes. It's for sort of a session-management I'm trying to write.
Usually better if you say stuff like this up front, it helps to have
context when trying to answer a question!
Given this -- and assuming you can target zsh-5.3 -- I'd go with:
autoload -Uz add-zle-hook-widget
session-startup {
command-to-run args # your thing here
add-zle-hook-widget -d line-init $WIDGET
}
add-zle-hook-widget line-init session-startup
Messages sorted by:
Reverse Date,
Date,
Thread,
Author