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, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4016 invoked from network); 7 Apr 2021 13:45:18 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Apr 2021 13:45:18 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1617803118; b=0beLO6Ys9Tqud/7M/glBM/imiSw3KtrKRpA927ACbA8oRvX7n4Q1iKnUDv1/aQIPGm/PT8Mwlm 3vwvnjzUtLrDrKam+ZEnz4dR50V33hyC0hbe19xU0VPEAHpPuF9IgcFA+jp7H/XxpO1+3ysYyA yy1mBKdtk8G9nVTeFRnJU8PjgjTnDWjxe0peMfSoibEPwgKh1I6uZiht43Ec24RZOfJ3Maa9Xy 98af9dxNpkvLFZu9y94BNFNhXqvTtxNwHBtquhNf1xqjsH0Z/N7craiXrs5LijyMj4qHryNNGb RjJtJ2NzIEU/E+Qu8Wv6zphhEaJNhvRQcMzL94inYw4ysg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lf1-f42.google.com) smtp.remote-ip=209.85.167.42; dkim=pass header.d=gmail.com header.s=20161025 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-20200801; t=1617803118; bh=y8D1nyaxwIN9kQi/rPLxEZJWrhgDI4NVptdsbvO4moc=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:To:References:Message-ID:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:MIME-Version:Content-Type:DKIM-Signature: DKIM-Signature; b=sAIjEnCJduicmbGmkHJIUuzDPLIpIyCwQnrUeDn+S7m6zCFWaN69lcFQ4EG6RyrekfXSBtORYX bPSHcUt49K1i9T3o2WFIv1aDAPngj2e5KED0vHWzSP+Xc7754R7lmMhB6US+paIaTIn8WbbSsl tmWZmbSa+BOzuLroBXmmNq4rY1hniA0RbhcpyEGBTKZ0hUp7IHvTvkoo0q1k5Y9TomH414VbFN G097HBZuccwJ8UJCKMFb0PFD6fjrfvNJJrSSLa0co1v1zeR1wGApnf223fs74JXJ3Onqywdh51 MOYhBDYoR+yR6NfoGuWV0yrZsGGjHHsNlxK9zJ2gwLpVEw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=IHK8XJU7uGGqpnnJK9vlF/Xxb74Jc4XBCedsMvyiw5U=; b=JfMOfQkmBE4lhTdaMRqf19UyA6 YXNFiXBUbRSDpKQ70HFjS56NhQRESaIgKGhTzXd4NzJHOh//1F5GHmzG3XmEEK0Lj2uf9DL4VYvxH fUsCYw1YZCVFXkflZArSPTU2x7u6f4XMpDbvDQV2JBVy+oF86vJ6oGg+Ml1kjkKPPHMbkVHRrQSE/ YowfBaICkHScAQWlKj9F2rL6vqyC0vGba/SLUHbRbmQRPfM+DGUfDzOxJ88MPAge7Lu85WSaiDT15 taOrglOenjkbSUFi7ULnGzfjIQ2NcKnCwvz3tlYCQgil3Zrx1dPHnxES02zXbofeV9IEkO4LG+fX+ 8fiaTaxA==; Received: from authenticated user by zero.zsh.org with local id 1lU8Ue-000HIe-MP; Wed, 07 Apr 2021 13:45:16 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lf1-f42.google.com) smtp.remote-ip=209.85.167.42; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lf1-f42.google.com ([209.85.167.42]:42502) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lU8UL-000H4C-FL; Wed, 07 Apr 2021 13:44:58 +0000 Received: by mail-lf1-f42.google.com with SMTP id h19so2899530lfu.9 for ; Wed, 07 Apr 2021 06:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=IHK8XJU7uGGqpnnJK9vlF/Xxb74Jc4XBCedsMvyiw5U=; b=u+vvngOQVYVs1jrxm1ZTajeXuH9TcjHEDamhMKco6sK27QNw8whKfuI7F1c1tHE6S2 s5LzAsEcDi4u7x70i48OPL6xeW7qJhnTyq9G8MVOPlnOpi/iYYxvcfiC3v3+jz+RMBsq Gjy7e6aFfIdrQEj1C6NYoJ7gaXacH/wQXG4bozLatqLhvyfYJVjaQMBxMmED6meRN+yB KH7++L2jUDfPGGPswVLDJEsC9PwbAjFVGC2F8/y5GBIy8THWZlNr0aVL68AbeJAwCvJj tvjgKS/rEorvBHbESc9Goxrb3Lzbmb0J5JkqYCqeSGzGxfEtOg6MTAYq+rU4pCjgHUAJ sdAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=IHK8XJU7uGGqpnnJK9vlF/Xxb74Jc4XBCedsMvyiw5U=; b=IkRx/MLO4WDARL34M76JicQCEe1RO9ovywh8i9TP19/FLdJW10Dm2/UIHWqds11KdW V6MeZPMRsq6JfmI5mNfdr36CBCZm1bqiAsbTQ/DTRRIu9Askzn3ymriA8jWdEentyyQ5 rbvbNYPoU0t/MPwqziAlTDBWOq3aUtphPSC1UP4Gt81NOdxkk8VjRwBW4BeUs9hAWb8G HwyfYOWOp/IBiqwkPd+8P3wOs/bSj5+Zm1HK2CVmSShXXLWk6gW+l3oe7bysaIYydiFw KYoledp+RipCXqSHTLpq97ZYOSB3UnTxwr9TXv+ckq6YANHtN4i4QiB7gk5/M/aOdj/y zquA== X-Gm-Message-State: AOAM53363FIPcMHvo9/dbofs+S7PMS0cZru6Cw7UtOBwDbbu7m575gxx VhpjNDeH8p/q4cyCAMeNEfIyBGIVwEMUbQ== X-Google-Smtp-Source: ABdhPJx4bQsiHR97PgqB6YpgRp36XHmPC7Dwx8OX4Nacr85u5cZq5fkpHRfILL/ajDTBBU0H/jRvfw== X-Received: by 2002:a05:6512:6d6:: with SMTP id u22mr2489492lff.386.1617803096776; Wed, 07 Apr 2021 06:44:56 -0700 (PDT) Received: from [192.168.1.15] (hag-tkubng22-50df3e-132.dhcp.inet.fi. [80.223.62.132]) by smtp.gmail.com with ESMTPSA id q14sm2504636lfr.12.2021.04.07.06.44.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Apr 2021 06:44:55 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: Rewrite of zsh-newuser-install (Mikael's subthread) From: Marlon In-Reply-To: Date: Wed, 7 Apr 2021 16:44:54 +0300 Cc: Mikael Magnusson , Zsh hackers list Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Bart Schaefer X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Seq: 48418 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 6. Apr 2021, at 0.44, Bart Schaefer = wrote: >=20 > On Mon, Apr 5, 2021 at 12:44 PM Mikael Magnusson = wrote: >>=20 >>> # Prompt settings >>=20 >> This is 70 lines that should be a prompt theme, not pasted verbatim = in .zshrc. >=20 > There was some side discussion about prompt themes being unmaintained > and therefore unsuitable for this. My take is that we should find a > way to put some effort into maintaining it. We did just have a few > patches for it, so I personally would be fine with this going into a > theme. Sure, I can make a theme out of it. I think it=E2=80=99s important, = though, to then make said theme sufficiently easy for the end user to = customize. As Roman pointed out way in the beginning of the thread, one = of the top things that user want to customize in their shell is their = prompt. I will try to make it as easy possible for them. >=20 >>> typeset -A key # Declare `$key` table, without overriding any = existing values. >>=20 >> How could $key possibly already exist as an associative array at this >> point? It is created in /etc/zshrc on both macOS and Debian. > Also, won't this by default print everything that's already in $key if > by some magic (/etc/zsh* or ~/.zshenv ?) it does already exist? I tested it and it doesn=E2=80=99t. >>> bindkey -M menuselect "$key[PageUp]" backward-word # Page = Up >>> bindkey -M menuselect "$key[PageDown]" forward-word # Page = Down >>=20 >> I think most people expect these keys to scroll history = backward/forwards. >=20 > I don't recall what difference being in the menuselect keymap makes = here. These apply to complist's menu selection only. Being able to page = up/down in long completion menus is very handy. >>> bindkey -s '^[-' "^Qpushd -1$key[Return]" # Alt-Minus: Back to = previous dir stack entry. >>> bindkey -s '^[=3D' "^Qpushd +0$key[Return]" # Alt-Equals: Forward = to next dir stack entry. >>=20 >> Might go as far as say NAK on these bindkey -s abominations. >=20 > Yeurgh. Agree, avoid bindkey -s. Sure, I could make these into autoloadable functions instead. >> Overall I think there's a bit too much stuff in here. It's longer = than >> some (many) actual personal .zshrc files I've seen. >=20 > I tend to agree. The feedback I=E2=80=99ve gotten, however, from the Zsh packagers for = ALT Linux, Ad=C3=A9lie Linux, openSuse and Fedora is that it=E2=80=99s = good stuff. :) Some quotes: "this zshrc offers a lot of tricks I personally wanted to use but didn't = know they were already implemented; thanks a lot for shining a light on = them!=E2=80=9D "I gave it a spin and it looks very nice, much less scary than the = default one. I've checked the default .zshrc and it looks fine to me."