From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5389 invoked from network); 8 Sep 2022 06:25:40 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 8 Sep 2022 06:25:40 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1662618340; b=WKaDWIUCKLvRm+y0RGDjRi20hIpC4814Cz0gVxEZZ9A53XtMrNaSqChPaZUM+mguaiJp5AMCX7 ziefYzSwVhKbDOqUDpdFQeigAYCesnkux/VXxmVY1hXHTdnQSUuLwLxajemc3vf+RTHeX0UiKY /XDYVYqwkVRQp4W2fUU/bytBQEfJEjmStjsWHbzjcE7KKSTl0M2vYMZk3HBsBraIStUIonfBTK j4fSZv9e+0txt4/2uvBTtSFayALIap78y1tgstnxu61+ygc02Bhl8g8WT7oN120mBxGORXHpAn P3uE8rFEfoPoy6oO5lhmtzWk+IB3C0nfhS8EKSR86//lAQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f45.google.com) smtp.remote-ip=209.85.218.45; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1662618340; bh=whulSG18iIWDF1UQz1Kp4Ia2tyQH/r2qJxduFN6+9LI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=hRINuOZ/GD5rNATvnVwRLkk/dC3LYM/so95FK9MqHA0r/nOCWkSHpk66LgCIkMbOoqbdFkp8XF A5Wf9DVCa4CyayF5o49M9/IDWLTb9/bMsDX9siXL+F8D+DCbUPLfAkMmPThQG4j7/fNi71/ENT yRqTEASB7VLPj5ORhSkjmGLsxhXMydYkyn+J4xJuv7BQinLwXy0Qp50SzfCMoU5wIb2iSR4yy3 89XdT7KKZkT6x2QEPtweOzOTS2IVpAKM8e6ki55LDryHFy14xuLCx74/TB/88gLLGHTkpjw3Gz 9EKegfsWJRg8mdB8jdsUJr4F6BcLI9uMTsxR5apErpzJdg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=qVV+0rF5A45BHodrBz6fd+/+5h58AR3D/tMbadwrpSI=; b=hT9JMtkuQvYH0Y2uzKB3Ln+NIC zIrBfZoXQtDOqHxXtkHr4XFSArUcwYwMwjzrDtHmyDjR1dYja7hcdaqiwD2FYZQnMvdPv6sIoAyPT 4z6OOhrH5QcYVMB2+PuRnK/R/qY08VhC4Rq6XRzJr3ZagMOg5WqGsoFeNlKCbG+Hi5hFBWTX/2wao 0Vp5F56oAhj3ekB7hpnaqvNuNkZGvrF4MdHLm2aekEyqFkOZgBXRsHrIm8iVPq2rBDvzJ0NKhlL1C AY2+j34WtNM1fM14dfvnj3GEUdRUOquAroDlz1VcGNHfgU4rtqSypSVVOn0b/CcFmwLcNGZGNHiBc Bky6fF0g==; Received: from authenticated user by zero.zsh.org with local id 1oWAyo-000Ipw-FM; Thu, 08 Sep 2022 06:25:38 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f45.google.com) smtp.remote-ip=209.85.218.45; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ej1-f45.google.com ([209.85.218.45]:45863) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1oWAxr-000I8C-Ro; Thu, 08 Sep 2022 06:24:40 +0000 Received: by mail-ej1-f45.google.com with SMTP id dv25so6394392ejb.12 for ; Wed, 07 Sep 2022 23:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=qVV+0rF5A45BHodrBz6fd+/+5h58AR3D/tMbadwrpSI=; b=XmSAs8RwIKiOUfKQRDqsKq18OYRs2obgU3nhphljvT2Nqf0tRfovXHJl22CMFKleLH oNFxDUO3Aka5JJtESu0rbZ7CWjQVkA1gkH8W+vrq2Utzc//Sk3Lcfy1/SkrTABMybJBX zwfZurXBRQ6NX2IIew0F28PR13DgFT4coUQGLz5py5HfOT9wOlFZ2Yhxf+Qywj/ayUVn Whrvkx2zLr56VhpFXTN7m2NsMIOD7RPPti72ZFCLPZzHuz1dlXjFNyeOPOReKhf4vn1A Rxvkmu/2Lj5Eb45zPBP5FLn6Ee7a0AJK94tOAFuBWXVD6oK+uJ4Qva7DUycIxAcngzra 3zZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=qVV+0rF5A45BHodrBz6fd+/+5h58AR3D/tMbadwrpSI=; b=HxOxf50HSaaalAgKIDPajmVGd7RzouQ1ID3sznBTITRzOIUTULxtlguVKvtFPuU16r q+bB31ngOBBMH+c2mDK288BA7YpwTSDgU+AiE7k+4ybbHEHLlzTNC3kkIlbUZYKo1Xc4 nJd0kMJH6MHx5ioE4Lsu/d7AqyPxu6snTqGaguKqzv+ZZKrBkytbVhFtHx7Kg1Jp+vMv 1eOj8Vs5PKDvx5bzAavhEF6H+iwFCH+Kgz1qBfB97aR1sd+i4FgV9klI+mit17PGgcLn KEAZnvwDnCoQVi67ch8jROYpfnGYe0aR4uma68fyUY+l8qIaXwLCAsAcH9qtpsm2/Lrj wA4Q== X-Gm-Message-State: ACgBeo10JMjEy4+j2AS7QNC+DitVU1FMnn5AsknyBZelMyO4dnMGgAi3 zZxa8wcu71JmGG/NgbhPIFEMY6lfVIzXfuwUyF4= X-Google-Smtp-Source: AA6agR6YVM6g9Sz/j2wLVXKHA70GEDOxZxQCvV68haN+Hf4Z3g80uuGKPWKKzxM+yQPQOExyfqI7LvCJb0kQGC4GLPU= X-Received: by 2002:a17:907:2e19:b0:73e:f770:eddd with SMTP id ig25-20020a1709072e1900b0073ef770edddmr4828837ejc.249.1662618279014; Wed, 07 Sep 2022 23:24:39 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Thu, 8 Sep 2022 08:24:24 +0200 Message-ID: Subject: Re: Injecting a command into stdin / input To: Zach Riggle Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 28049 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Thu, Sep 8, 2022 at 3:27 AM Zach Riggle 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 , 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.