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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30311 invoked from network); 5 Apr 2021 18:17:05 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 5 Apr 2021 18:17:05 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1617646625; b=fsLyh+WW5mTiYNF9EuoSeGNxTARCCu5KMzG/XqrBB32E1Ai/JoU3oy64cAODn3j/k+rovBPCiK Buy4jKsXdqGkZBfgUx4aUXaZ0+BSqOScW1bLdjtSTvQYscTGaCpRCnlVsUtPbm54d54x5RVGeB GNq0DRKUUBE4DdA3NQzI6QinXkkQObVWNpaJhtrspzChgFqmALaaFSx+66mu4lGRMgbB4472UJ mvBixPrGcQ6QeTjjBM4S8uKi0QI0m82j7Z+lko1KN2eE/d4ZTFCeJklWxO8AgovxauosXnLnwP kKjS2YW553RPc6N+ZvjFt+gVAGDAu2zz4ZfFx5rtPqYrGg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out4-smtp.messagingengine.com) smtp.remote-ip=66.111.4.28; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1617646625; bh=lgSivtT0W5ia8fNmhIB/4xXzcdw0RITMBpMsdAs+p6Q=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=mck2WrB5erqB9ZpEeVGfdJJ0fEiBUkQDg4gWOZRv6V5jzw1PpFpAE4lA+OtJysd4B6IIxjWh2G U7tqIEvUkzWwNq8Q68llV1yfbxvY6WfWCRd83jov4JZIinrtz+VDWrqb+MECOj3nFHTFdgaP8b cXhY8AyWx0YGAOMcu7FJX7FYzTb1WFoKbohXyiTXLDmWWiHjr5ONqgEuGevr/4e9HRW+OmqOXN 2V9ZBbvxel2eZKAbgAzVwV2YdAF3NKQEY9ZiSJvfaOePxrxbrWM3TyrJj12XXgmvLdZcXzzfog +MsZibpZuxPzljvXh9JAlQZQVCdWAFC/Ff622CRFh1qY6Q==; 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:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID; bh=Zn1IuX5yZ1eVNBh4ssw2uxz25Y/0DBv7SF/QdyCWDoo=; b=vKNrPLoLOWjRiG8TXrT0QtzBoS 7xkwMB4EL0yBdrM55vwM9FW+7M/sW2ojAu3LuiBrwJ3iaqmGIZCqZage+H0tnQbJ80KuE4DQ8df8/ ecw0MLxnKmv4QZr/+vMQcePQSKYRPBT4cgRqrCahhYi8ixE1WFjmJQppJ2kQHrdy7LwKZvJ4XASym VUBMIMGnrzYWEV6qXQHkcxe26ZnOdNfkxrnMf3M+qrowCINEIbC+ZcXwGN6/Q58vpzwTeAkFX/F7r SiAyTePetHv1Bc1iXxV2JhssW48k8BGanyjwezydqfayM4tyxpJi+LPKu4y3eMZokUVW/FpdCq/AH a7uBWwbw==; Received: from authenticated user by zero.zsh.org with local id 1lTTmV-0003Kz-Hp; Mon, 05 Apr 2021 18:16:59 +0000 Authentication-Results: zsh.org; iprev=pass (out4-smtp.messagingengine.com) smtp.remote-ip=66.111.4.28; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from out4-smtp.messagingengine.com ([66.111.4.28]:38959) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lTTmD-0003C2-VT; Mon, 05 Apr 2021 18:16:43 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 8DC1D5C0092; Mon, 5 Apr 2021 14:16:40 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 05 Apr 2021 14:16:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:content-transfer-encoding :in-reply-to; s=fm3; bh=Zn1IuX5yZ1eVNBh4ssw2uxz25Y/0DBv7SF/QdyCW Doo=; b=fHjrZOG8uVJGHifie3MGVrBScsA78zrUSWX2t35L20gHhmlTcdVH8ltD 1FLLnbKonhisNyprTI2S53eLt/8bFwTaUaBIToc0sIEOc/+CwOOi5da+X/4E5W9X jv6aSNnBhnXCvDHof6lvpZnW9jfiIuTZDmUnOJ38rl4v9Ng5Fly7x0L9CgoQMkGf L49EslMmXPs0PUIJSrekbo/MFV9a/gPlSMZHXDOrUMvY9sqbWsFuO55EWV3Lcqbr 0HeHA795vYDttJrvF5wh09svhzdOPdi8Ga7lTs0+JuH7TDEbIDgNabT4iaoBxvj9 ex6hb35TQK3BYCov502L1hJrg6wOMw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=Zn1IuX5yZ1eVNBh4ssw2uxz25Y/0DBv7SF/QdyCWD oo=; b=G7LdB3rXD1cCuXaxtvRUghKqLSaG9xRvDc4Qwteo2Ccu1jKU0JCcykHa8 MQmWdKS1W9xYRP1xBKmwwPZQsaqXnRf6vN+yNXj7QKgrmOWRxXj4BNnikpTmWrXx 0batEIIT/CgEK4KXbzYntBNAwN4JxYANcu5VSbEnDxmbW2qkeoXqHU/G+iTwXNOu d5xcvuXwSC2sVQduMgIXJ15gyapTVLn8/9QWNuQrKTeXrNx13VHgva63/MZbj1p6 dENFdkViqhl4i8gsj9tuwM2VNq1nk3P7TdidDWwY93uRoYr+nL8ZCujbHZNiV9pm N4+j7gRUgJaXiyfaJvf6t8WQNGTtA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudejvddguddvgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggugfgjfgesthektddttderjeenucfhrhhomhepffgr nhhivghlucfuhhgrhhgrfhcuoegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvg eqnecuggftrfgrthhtvghrnhepleehudejfeejieejleejfeegteelveejgfejhedvgeev vdetgfevvddufeeggfeknecuffhomhgrihhnpehgihhtlhgrsgdrtghomhdpiihshhdroh hrghenucfkphepjeelrddukedvrdefiedrudekudenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpegurdhssegurghnihgvlhdrshhhrghhrghfrd hnrghmvg X-ME-Proxy: Received: from tarpaulin.shahaf.local2 (bzq-79-182-36-181.red.bezeqint.net [79.182.36.181]) by mail.messagingengine.com (Postfix) with ESMTPA id 106991080063; Mon, 5 Apr 2021 14:16:40 -0400 (EDT) Received: by tarpaulin.shahaf.local2 (Postfix, from userid 1005) id 4FDf4P0r8kz1Pd; Mon, 5 Apr 2021 18:16:37 +0000 (UTC) Date: Mon, 5 Apr 2021 18:16:37 +0000 From: Daniel Shahaf To: Marlon Richert Cc: Zsh hackers list Subject: Re: Rewrite of zsh-newuser-install Message-ID: <20210405181637.GA22397@tarpaulin.shahaf.local2> References: <20210225080519.GA22300@tarpaulin.shahaf.local2> <20210227132121.GA9308@tarpaulin.shahaf.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Seq: 48402 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: Archived-At: [ for skimmers: there's an unrelated question in the P.S.. ] Marlon Richert wrote on Sat, Mar 20, 2021 at 00:12:28 +0200: > Hi all! I pushed in another update: > https://gitlab.com/marlonrichert/zsh-sensible/-/blob/master/zshrc > > I reorganized the entire .zshrc file in an effort to make it easier to > read. I'd love to get your feedback. > > Also, I'm wondering: How do you plan to make a decision on moving > forward with this? At which point are the new files good enough to > replace the existing zsh-newuser-install? Here's a quick review of zshrc and your version of zsh-newuser-install. Haven't read the entire thread yet, so apologies if I'm repeating issues previously raised. Issues in the first-run wizard: 0. I recommend against reusing the name zsh-newuser-install for a completely different thing. Names shouldn't be overloaded. 1. Errors from «mkdir ZDOTDIR» are discarded. 2. Uses of eval are unsafe (lack ${(q)}) and unnecessary. 3. That also applies to the munging of $template. 4. "$zshrc~" is silently overwritten 5. what happens if the exec on the last line fails? 6. Outputting `man zsh' in two different colours is confusing. 7. zsh's homepage is https://www.zsh.org/. 8. zrestart doesn't handle $ZDOTDIR. 9. For educational purposes, printing should use «print -r --» throughout. 10. Should zrestart use «exec»? 11. «print '\n'» prints _two_ newlines. That's too obscure for educational code. Issues in zshrc: 12. Some settings seems like they could break the principle of least surprise: e.g., FLOW_CONTROL, NUMERIC_GLOB_SORT, matcher 'b:-=+', check-for-changes (as opposed to check-for-staged-changes). 13. Recommend not to hide symbols from grep, as in up-line-or-{search,history} 14. Use of «bindkey -s … '^Q…'» seems questionable. As a way to inject commands, it prints them to the tty and adds them to the history; that doesn't seem elegant enough for example code that all new users would be pointed to. It's also brittle in that it depends on ^Q not being re-bindkey'd to anything else. A few proposed additions: 15. hjkl bindings for menu selection: if zmodload zsh/complist 2>/dev/null || (( ${+keymaps[(r)menuselect]} )); then bindkey -M menuselect j down-line-or-history bindkey -M menuselect k up-line-or-history bindkey -M menuselect h backward-char bindkey -M menuselect l forward-char fi 17. Configure vcs_info to show the original patch's information during rebases, etc.. It basically boils down to doing «hook_com[applied-string]=$1» in a gen-applied-string hook. I posted a fuller version in workers/47519 at the end. 18. Show how to use terminal colours/attributes other than the basic ones. E.g., I use ${terminfo[dim]} in some places. Cheers, Daniel P.S. I wonder if «: <->» should always behave as though NUMERIC_GLOB_SORT is set. Haven't tried to nail down a complete functional spec yet; just thinking out loud.