Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Injecting a command into stdin / input
- X-seq: zsh-users 28049
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Zach Riggle <zachriggle@xxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Injecting a command into stdin / input
- Date: Thu, 8 Sep 2022 08:24:24 +0200
- Archived-at: <https://zsh.org/users/28049>
- In-reply-to: <CAMP9c5nxY0yOESt2x5=s=soGPA4ZguNf4ZwQJ4YJSjDDtb9whA@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAMP9c5nxY0yOESt2x5=s=soGPA4ZguNf4ZwQJ4YJSjDDtb9whA@mail.gmail.com>
On Thu, Sep 8, 2022 at 3:27 AM Zach Riggle <zachriggle@xxxxxxxxx> wrote:
>
> Hello All!
>
> I've been doing some rather ridiculous things with zsh-defer [1] in order to speed up my shell startup time. I've knocked it down by about 80%!
You might want to read https://github.com/romkatv/zsh-bench if you
haven't already. Don't miss
https://github.com/romkatv/zsh-bench#deferred-initialization in
particular. The tl;dr is that deferred initialization is almost always
a bad idea. I'm being cautious with "almost" here. I don't actually
know of any use cases where deferred initialization is the right
solution.
> The down-side is that the terminal exits if the first input is <enter>, but works fine if any command is executed.
Never seen this. Can you post the smallest zshrc that reproduces this problem?
> How can I inject a command for the first line, e.g. "/usr/bin/clear" in order to jerry-rig this to work?
It's too early to attempt workarounds. There might be a way to fix the
underlying problem.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author