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 20107 invoked from network); 5 Apr 2021 21:31:23 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 5 Apr 2021 21:31:23 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1617658283; b=iReFt0ZU+MAy+CxPxhFKR3F9iJMJngA8glB39YKFduukTsYMLdKM/eCUaQRm5cMBL9+mD+UGKL 3hO++hZTjrGF0MafDdCy1YWoZsrK6ZyOHE6IyqkyDnrqivnGwBWmRshLQl/1Xe4+nXjOTCYNb6 yWTffgk1+XBY/eEJODEJY2tonKUbE0Ke2oLRXbZ8r/HyCs848QQly6bFtUjkywHtCvnvqfzyjy sdTS80oKIu+PRwrZkYKGVJ9k696SIvdCq4gl5EFYnk8eIu3AszRPSExIvFqQ0l5eeAFusRRBq1 uKVJebMBfiVgBP6cxVF5jpXTrGEDNDc/iyaAfStNywCcbA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtp.vivaldi.net) smtp.remote-ip=31.209.137.12; dkim=pass header.d=vivaldi.net header.s=default header.a=rsa-sha256; dkim=pass header.d=vivaldi.net header.s=default header.a=rsa-sha256; dmarc=pass header.from=vivaldi.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1617658283; bh=VySaC/7dNNO1C/YrcvVzEcNiFtuXYSC11H8LUq9Z6uU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Message-ID:References: In-Reply-To:Subject:Cc:To:From:DKIM-Signature:Date:DKIM-Signature: DKIM-Signature; b=p5B2JiRfePIK2S4aa7sLPwky1OdF6zWplmi12XmChTWQ9Tus2nZ6F/Qf5mqXPRuroemLPpCj8N 82AU9tEd02lx+WDfkKe9zIK2lAHfDTO3qjoaEgYzlvZTKHCYaZQHncEn103pX00icD2HSoJqXD RUyIW48/qMvMEMAIJe4izlF8aXBfpcJkzgca35KWSeiHtCoGMU07Ku2/FmF4L80xXW9h4rBUu/ AJznOKyBOD7eDtY5sVs6tc9xIUy9yu2tnYJqWvSmdcwgCVIGrIE7PhOlrXAB74wZMUYQY1/Ugw ECTzmBJakJHI3JMYAPGK6t0qOJ8OJ4vn0lA7atcEtGL7TA==; 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:Content-Transfer-Encoding: Content-Type:Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date: Reply-To:MIME-Version:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=imsofhlFmI8Ur7kERVMBrTRZ8TnavuoFnAgDX4YLi/0=; b=XB6M1za6RMbelutHmiOyCNdTM5 rgFe+bsuD8DRVRuSzMcx+AmuZ/Ts/DDlVto1Y/ClNnAQRbqAaJWXlnEnJzT3pp5K2fjkAKE4YFDVq RT8+fHs0xqONIsH/nzAtG8HgJDBQDXcTq4s8T3YCdher9ZW/3AyhklTdnpLCPSQJ2hKnAkimpazb3 TEsfc4wCp3DN5wdNmG6x66gqwlS0ZHeeOv9xNi6YegH5wOFFJ/OC0Wtx9l2YFzUh534XUVCFsftdu E7UaJWkIL02FPO1iTFb2gyQpRdoLkVUC+ueBMhSp1HdrMyJXY7S/ZcRqIqEbI2BUyS1HrxrZpy1IB YvXJvs1Q==; Received: from authenticated user by zero.zsh.org with local id 1lTWoa-000Cm8-UB; Mon, 05 Apr 2021 21:31:20 +0000 Authentication-Results: zsh.org; iprev=pass (smtp.vivaldi.net) smtp.remote-ip=31.209.137.12; dkim=pass header.d=vivaldi.net header.s=default header.a=rsa-sha256; dkim=pass header.d=vivaldi.net header.s=default header.a=rsa-sha256; dmarc=pass header.from=vivaldi.net; arc=none Received: from smtp.vivaldi.net ([31.209.137.12]:48500) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lTWoK-000CXm-Rw; Mon, 05 Apr 2021 21:31:06 +0000 Received: from localhost (localhost [127.0.0.1]) by smtp.vivaldi.net (Postfix) with ESMTP id 5E878BD01C; Mon, 5 Apr 2021 21:31:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.vivaldi.net 5E878BD01C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivaldi.net; s=default; t=1617658263; bh=imsofhlFmI8Ur7kERVMBrTRZ8TnavuoFnAgDX4YLi/0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=e6cSlEn3nlOKZjjL0kvzc61J/UZkklupWhxoOmOPh7VT1C/X6sDfBtUVmo84lps+Q lt7lJvdMqw4l4MHoSVgsjSa6Zu8Qt04oNyGGKIk012YpAQVLtzTH3NWtTLT+mVgAxC PMQIqUpghF/7L34fXCneTvwFcCl8gYTNYL5ZNaAfRFg7twjT9qzYDhgs88KUEv6oNo by3y0clK9Rh27BIKccO4dF+lIylQXTg025Qeh8LakxNy5oLdeGoO7J5OFS2kWYXNRf 4oJrjsCEEoIeF5Btpx4qSzS5O9ryzW8rnGap8kxk9HHTzeQqkkMLz/XAejonJNxEFZ /qUqFBXw6SPYA== X-Virus-Scanned: Debian amavisd-new at smtp.vivaldi.net Received: from smtp.vivaldi.net ([127.0.0.1]) by localhost (mxo.viv.dc01 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HaJotFBAmNHq; Mon, 5 Apr 2021 21:31:01 +0000 (UTC) Date: Mon, 05 Apr 2021 21:31:00 +0000 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.vivaldi.net 174A3BD00E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivaldi.net; s=default; t=1617658261; bh=imsofhlFmI8Ur7kERVMBrTRZ8TnavuoFnAgDX4YLi/0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hMB30CO7DH3iMfj+DfAMDgc1g0hxP4uFL1Urp8romQ9fKCI532a+iXt0wxZXK2Fe6 cbQtXPgDI/OUzWI7o5kJLglrb9X2wdLsWOCTS9iZP1n+H3SRGBWj0YtOY/86xkH/ZT uVOWWye31Srep7LOBBuredk3CHvZD1RefFmRIjpFPOEK5jL99Hcw1MA+QIzW6/60wR YvrNEj8EAqm1CKvh22aMTJIKzcgiuO3knGNV1E5C5/Rpr/kvZSyzzy2q9Kn7KI1tKN WWNYR5CCaKAkqU//pDS08sIY/EkqDCvLIpLAryZa9kP3D2EV8dpkUNbVhlEhrikMUq UnQLh9Y6Z7AWg== From: gammafunction@vivaldi.net To: Daniel Shahaf Cc: Marlon Richert , Zsh hackers list Subject: Re: Rewrite of zsh-newuser-install In-Reply-To: <20210405181637.GA22397@tarpaulin.shahaf.local2> References: <20210225080519.GA22300@tarpaulin.shahaf.local2> <20210227132121.GA9308@tarpaulin.shahaf.local2> <20210405181637.GA22397@tarpaulin.shahaf.local2> User-Agent: Roundcube Webmail/1.4.4 Message-ID: <3667b6680b4a611abd4d954baf6b4180@vivaldi.net> X-Sender: gammafunction@vivaldi.net Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Seq: 48408 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 Apr 5, 2021 at 1:16 PM CDT, Daniel Shahaf wrote: > 0. I recommend against reusing the name zsh-newuser-install for > a completely different thing. Names shouldn't be overloaded. > > 11. «print '\n'» prints _two_ newlines. That's too obscure for > educational code. zsh-newusers-install is replacing the old zsh-newusers-install. This isn't educational code like the rest of the files in the repo are. > {1..4} {6..9} +1 on all these. > 5. what happens if the exec on the last line fails? > > 10. Should zrestart use «exec»? (Addressed previously) zrestart doesn't use exec because it could fail due to an error in the zshrc that wasn't caught by the zsh -n line before. That said, the same should apply to the newusers function. > 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). - FLOW_CONTROL is unset by default, the line can be removed - Not sure about NUMERIC_GLOB_SORT, do you have a surprising example? - The 'b:-=+' is only prefixes, and only for the options tag. I would actually almost prefer 'b:-=[^[:alnum:]]' to catch all kinds of obscure option styles programs use, make them discoverable from just typing '-'. - (No comment on check-for-changes) > 13. Recommend not to hide symbols from grep, as i > up-line-or-{search,history} I agree, brace expansions make it hard to search. > 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. (Personally) I would rather directory changes being added to history. > It's also brittle in that it depends on ^Q not being > re-bindkey'd to anything else. I can write a proper widget. > 15. hjkl bindings for menu selection: I type during menu selection, and users will be able to as well. I think being able to type normally, except for a select few letters would be confusing. > 18. Show how to use terminal colours/attributes other than the basic > ones. E.g., I use ${terminfo[dim]} in some places. We already 'autoload -Uz colors; colors', so $colors[faint] may be preferred. Although it doesn't have \e[ like $terminfo[dim] does.