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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4719 invoked from network); 18 Oct 2021 15:27:27 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 18 Oct 2021 15:27:27 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1634570847; b=W5jRNYseXWh93/FtpSuYjcMf3OLmURemgTDD1Ff5CVYG65wcST3Uwiye7wnOA2jwgmDdwUoGXA gh52QMXppv4YzFWkT9K2qF6z31iPPZnC/bNndZ9J2eRANPHpY57NA8KqQ4/rmfJEJx3xOQC7IF sJ0Dq4/0XaEiZXuVo5+V/YtpW8BPHe2yTiagC2DbVyn8ghbgdYMSBYgU/fnX89bMVhw1vHNtYW jKshGSt7GpErz23bnpDZBTv77HnGYQ4TB+xQWW3Pf5ayuP4lVCtS+Exqut5hvlDOU1NUuBIKlc wrRV5DgnxL97C9K3TSfkRvmcA1Ecs3S76zst/Cs0HfGRtA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f169.google.com) smtp.remote-ip=209.85.219.169; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1634570847; bh=BRnQ/liFmpdaBd+9OZCmjHisbABIWNqZseYJgWsFwVI=; 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=ATjTzwV8e1FuE+azUMEUqi2H/KgAX7eBdrd9atwZVpvBXaIdu6QIBJOYrKEqayd6Gw9ut5dXdc H2Z6B3PiRf64Z16ngDwNKDHdvE9WUWqX6S+yBAZ58sNPcUtBCyVNFs+Gr16KmBfmjyaTGdAD1/ alAxDyyLXJ7hVZKRcUH6CbRG20DexStqdPUVoNEP+f+OvApGmhICC123OlUy9JqmjSc1CCDy/I s5TgCFidcipBI6cSdCYcayuwj78CFSSWC3w5Qk9ao9LCOy+4EuGd///DV//I41SbGhNcb6zo/u WhSKuuAU1cNv6kY1mLxsyjETgNo/QyqzivqWo5oJG480og==; 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=n/F5MtVSbSlF847He6uNCUAq5W8NKASrKr8pClTlEvA=; b=lJ/WKYS1qro31kJSuc2b964Ir4 cPmYMpDROnyg3WJWwYVvvfFDo5DhyLFVHZW9+4gc1zofA7tKcJ8k3RJ9SjGB5WbyLm0qaheUyuwJ0 p6TeBle3LvMXLxzeepJb5JbfC6ScCzsRmSSZ1B1/lukdwDk8w5KX+pdUkBEDo/dr5E7MSCzOgxwTx rZUdwgLqX4SB/ZpB6fJODzCg0mCSg2xogAyaz4qrsIGB71XyQOe4wYi2MsdW70v2M8kJw3L2YQ26f GNFjHQh913t/OEkDvgBmuPADDZeAzZM36ueCQhlvtXbneCraVNkeNCklBvEdslPK25CuHJev2zFDP nGJZYcZg==; Received: from authenticated user by zero.zsh.org with local id 1mcUXt-0006Yg-Q0; Mon, 18 Oct 2021 15:27:25 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f169.google.com) smtp.remote-ip=209.85.219.169; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f169.google.com ([209.85.219.169]:46029) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mcUXL-0006Hu-TD; Mon, 18 Oct 2021 15:26:52 +0000 Received: by mail-yb1-f169.google.com with SMTP id i84so3005587ybc.12 for ; Mon, 18 Oct 2021 08:26:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=n/F5MtVSbSlF847He6uNCUAq5W8NKASrKr8pClTlEvA=; b=GJJscml/5F7ESYx9obPDx6cAC4XL1XpZob5zl/RHzW1x9aRbUMI3KfHge+6eDrYpGR K5uQEJdmStEoBjeqMLaH3Tz2jlm1knthYwdTTs7IApZ70H2B3B8A9azADyRGYHtp9LOp 56rnNUgpLdE+HY7vJyVdS2A/hGIEXM+J5VaNrq4NY83/xHB8FGhwKK8v1vAjeqDVbqOr rHeVLDMANJp5vw8zpYwFNG8xyEI5iW03UJGlXS2w7rlstV9Mm/INjP94J8cFqWlxF/gE JJcfqZmYDYTxTk95jCPOF446ZzHth9x/epKSERumpU6ofiUK2okQFa6K07vMHKYAboVn y/lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=n/F5MtVSbSlF847He6uNCUAq5W8NKASrKr8pClTlEvA=; b=NOP4sTnXvZQVOm709BGFlvPgpCtqAKdAEdL43gkz/EKgkz4Jlq1pLBOsnMYSGqBGmN IPrpO907g9bumOP7NjSQeSL1My8PoxvyhWWiCdKFw53KoAzD+MBH14fBWIth6rIy8y3R PERLqAKLf8EtssOTyVctqpFD3QwWz2iR/dwq/cfeJGxgcOu8KXhAxQHSA73DWzcavtum d09/rtFIM62mkRZTxcr3/Sr35RhCLGIleLhTOSZVyrq92GenFNvh7gDw+Oji2oQ0XtsF 0e+oi9ChhDsI81wiwxLX8ec56wUqhztpfM7hyFQon9jlIRBi5iT2+OwPV/fdmH7iNDHf CMSg== X-Gm-Message-State: AOAM5339fNwJR1pEADAQesI5uNA0tvjkMUDiY+QI1itHVe2Mr0VHob76 mj9eHJbWW93xPUnfgWovpNPZblXfrgIxmEsJc43wvQ== X-Google-Smtp-Source: ABdhPJwE3cg94NJXbRNE2TOR4hxHNPjOSJwzLsVv63LbeGV0XL4wHRQ8DJvsh7i3im5H6hsDgOIpu9P3X/LL1X9ou7c= X-Received: by 2002:a25:7e46:: with SMTP id z67mr29637035ybc.166.1634570810098; Mon, 18 Oct 2021 08:26:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Mon, 18 Oct 2021 08:26:39 -0700 Message-ID: Subject: Re: Input next command(s) while current is running To: Mohamed Jebali Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 49494 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Mon, Oct 18, 2021 at 12:15 AM Mohamed Jebali wrote: > > My suggestion is to pause the output of the current command when I'm typing and then resume it when I either hit enter or escape. This has nothing to do with the shell and everything to do with the terminal (or emulator) that you are using. While a foreground command is running, the shell is entirely stopped, waiting for that command to finish. It does not see or react to your keystrokes. Even the ^C interrupt is processed by the terminal (strictly, the terminal and its I/O driver) and translated into a signal sent to the foreground command. So when you "type ahead" it is the terminal that is collecting and buffering your keystrokes, which are then finally read by whatever first asks for more input, which is the shell if and only if the foreground command never wants to read from the terminal. You wouldn't want the behavior you've described during an editor session, for example, or a pager.