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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28270 invoked from network); 12 Nov 2023 13:49:33 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Nov 2023 13:49:33 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1699796973; b=V4XQKkwHXqVYaijTkyL+6XN90zllR9sx74i/980st6TuNCRSc0AzYjG5PTOJ4aWp1xl7TX1mu7 Vn5wFvX/AUr0Dc2LBEsr14ewfVxdauQCbLvwaWqqnw6nOJ//ah29oARKgP81mmQjS+HtrXhyyV 8Lynooi9ERNw56tJ6jo6kf7xUpFBJSxHoI5WoPtMnvn7En/k0xBbNL/UM+t1xg/MLMG+b5q9nB vx2k8XvtO0qLWInthRHVLGBe3/BxlavNPldDNqmBwW+28FYr29hR797F6zL7W1K2xzVjWbuFTx BZZL7aK5E78PTjzkp9a1NfZ9st8ICbZutPI2Yt4Kabqpeg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lj1-f177.google.com) smtp.remote-ip=209.85.208.177; dkim=pass header.d=gmail.com header.s=20230601 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=1699796973; bh=yIXHXECi5FL+xR+EToCdnqzXin8uyJtCsi6fBeLKE7c=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:MIME-Version: DKIM-Signature:DKIM-Signature; b=OXHg/rLN3dbSP24xIPPEOP+46mEkah1DcLx3WjkbCO07rJP5axqgqdj/kxcQ4nPn5HowNuqqCp rTGMH/Kx7P21agFtYmvtlVj4ESExMJO6K1PgY44OgodDFl2TMLd6Ez60Fqh2jA+eY8IEERXBTn rXm6NGrSXpO81NIaR4fmySvriCHP4aUs4nitAGeTW4DCgvXAR6Iex+/sVa1NdOKv6pRU7/zPjM kAumeTMZE7MviR/kGcY+9yzgiscGr1P4EopkXjFNY9ncwRUr2FRy3Q8uHT03UuMBNvjyo4Pqz1 93f7t18k4GHEEoE44qUBrYYgsX8b3hnC1Aoovw/i3AriXQ==; 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:To:Subject:Message-ID: Date:From:MIME-Version:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=oCu4SpgyEe8kP+doJSHa/RKTYMIDOEKok+TMqI+hiQw=; b=CoFXmKk/YrVoJa3XSLnKLaoRyE X2qvs7ianNW2v8bB9tesXvmeFXCpKmH5GstEcvSv0EzmhqxJXfrXyvRo+APgggFRwR1pP7LYU8nYM nr78CHkesitUoZAvNOEWevpJ5G4CbEriwgF4oKoit2fa+OEplOj4wDDRPTTCFIgDcg/pTvzEEuXOy EqVzYf7N58f+YPnzxbpbx6vE46PaMTrIugU2Y+k/dWLWIrBjpqOYhmdXGU0o0Y4UCepGjSrMGsgno 92674/t8n+7YFQyrjDGUg1Xi0Da00AJ/mOYHmg5d5Rs1x25XH1gb9/ADuu+8j8AX8QbkUJxGtS4MX 5JjSbs/A==; Received: by zero.zsh.org with local id 1r2AqB-000NZx-Gg; Sun, 12 Nov 2023 13:49:31 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lj1-f177.google.com) smtp.remote-ip=209.85.208.177; dkim=pass header.d=gmail.com header.s=20230601 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lj1-f177.google.com ([209.85.208.177]:58671) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1r2ApH-000MvH-OX; Sun, 12 Nov 2023 13:48:36 +0000 Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2c509f2c46cso50228521fa.1 for ; Sun, 12 Nov 2023 05:48:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699796914; x=1700401714; darn=zsh.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=oCu4SpgyEe8kP+doJSHa/RKTYMIDOEKok+TMqI+hiQw=; b=M5hQL3NMdqN4cmTeS618WwlS4mMro1cJmQFT30MjJo7a1D/xpvqi9BHuBHmWWYhqQ2 UHceDtXGgtkpvkkDh4HWrmrEPXwOJSFJ2VLftEyrHkXFvPtUtGR0ahCghobxoCAeUYqp J1AC9ZaWKGa/wdMxrJ2L0Q5TmaqZelxJboZCSf5ksJOKNheEz1598lWeUC6oPo35Vm1C kfQswOTrKNU0Qm3nca4k0QSCYL58ehd/X3G6xo3oMmHsM/ythtcNzrmQIZktrEeVoMZw SvXjxBrVkhsVI1VHgZ0nD9IruARMf1rJUQ0S2TZ8wOMb9qkbiqLGDpVBkAzkRJ/qC0kC +XuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699796914; x=1700401714; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=oCu4SpgyEe8kP+doJSHa/RKTYMIDOEKok+TMqI+hiQw=; b=BibhCeVJRsx9mDe2805CK+v3Ap6teoth9ohG7rO2UGm/daAXtwRoNX7HSo9LsjeadG Vbm8xl9NAZ4Jy2DJnZS1UD2cnN+6Fq2rGBkSfrBBr9xt4lpRKDctmy5C6pCnoYEpKkde STOF/Se4+Sj6DwXtG3feOsXT8gfB4EgDKi2aaUJATXcX546QyihbGZGnNPkkNL8R2irt a4ga/5X55gLS0hi71qjt96pPfazAP/fi0fTklDM5A+nGNQ4n5z9A3d2yAvWfAGm64jTH BN5VIRvKagf/xkS4SEyxV1Fb2n26JSE2IGRLHHlqjxvyeXcj3Ei4YBq3MTWP85S+Srd1 gUSQ== X-Gm-Message-State: AOJu0Yxvsg6N3kbVzguK86JJ7NoM07U7ziVag6VCQIi/kqKBNdwRaiea AHbpCB97vBDmKTi46+lukyUomkBfu0jjIMdOfEttHnAVc7amag== X-Google-Smtp-Source: AGHT+IHB/aUQtsT5DoumhbUGYiBO9esCIiC7l8gIBmMpc5JTXP663uzNvFcuJTs9ZQjB17wrdx4nX4EbP+zIPLCXiR4= X-Received: by 2002:a2e:8709:0:b0:2bf:b133:dd65 with SMTP id m9-20020a2e8709000000b002bfb133dd65mr3020101lji.38.1699796914292; Sun, 12 Nov 2023 05:48:34 -0800 (PST) MIME-Version: 1.0 From: Roman Perepelitsa Date: Sun, 12 Nov 2023 14:48:22 +0100 Message-ID: Subject: zsh-no-ps2: A plugin that inserts a newline on Enter instead of displaying PS2 To: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 29351 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: tl;dr: zsh-no-ps2 changes the behavior of Enter key to insert a newline instead of going into PS2 git clone https://github.com/romkatv/zsh-no-ps2.git ~/zsh-no-ps2 source ~/zsh-no-ps2/zsh-no-ps2.plugin.zsh Normally, when you press Enter in zsh, one of two things happens: if the currently typed command is complete, zsh attempts to execute it; if it's incomplete, zsh displays the secondary prompt, also known as PS2, to invite you to continue typing the command. I hate when zsh goes into PS2 because to fix the command most of the time I need to *edit what I've already typed*, which cannot be done. Those of you who are using zsh4humans have been able to change this behavior so that Enter inserts a newline if the typed command is incomplete. I've just created a standalone plugin to make this feature available to everybody: https://github.com/romkatv/zsh-no-ps2. No more PS2! Also posted to r/zsh: https://www.reddit.com/r/zsh/comments/17tgjit/zshnops2_a_plugin_that_inserts_a_newline_on_enter/ Roman.