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 12783 invoked from network); 10 Feb 2021 02:30:42 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Feb 2021 02:30:42 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1612924242; b=sNXNbfORqOfrjtIt+3WjeXB0FoioKNDYA4YnimIG6WytJ/uXy7d7WnUiTLUvQK1hgcC8gtbhG6 DFMI+3uBm3HAPcgYR8q/5XHYSkoQlFufZWWxNqXhE/aJ6hU/CxiM/yNxmLGJatTyN8xV1EBD2p CbW1DtAY2KbvgtroxjV8c+kEHWaGSOIU9NkN9HmJIGt8VS3NJjB/fdFGzHgNxSTfey33/Ilfgr Eu5WmfQH+Wje5zZwp/CKSmYdwFpUHdntXRBR/3Uga6gtqj9h9inhiE8YxZdqUpljDorEH5kolC Z0m1zwQ3CaoW9s9a14Uw4cKsQR6VOk7C68oPkdBcP27aJg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f180.google.com) smtp.remote-ip=209.85.167.180; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 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-20200801; t=1612924242; bh=BbFlxoB9WnuivJ3N3FhiWuUnO3lqOgfpSOB0Eox5WuE=; 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=WGTjaaBwf6w3CsR82DhprsBEJJiv10ftj5/QCQuKyBqV/z1mOzcFDIYguV0assr7VTv6l5fqhU rM16m8kq2ee5sF/ZfEnQKX1n92tzmXMkFc6z+PGejqUyfdWrbXqGP1/4K20n9sQTWQzp8cyvge PISjPXq/DC7Vy+2GhBh6eUKVh9w2we1R3yarOSERcCy3kAo++rcezkJ+dNN17nEPizVIorTDZZ WcZu0qWrELPgm1IK8DUgkovg32t/GMn5COaxXZfg16YKUrbmRMb4t0ZyPbpbx3BvtxUBd1CmLN Epf/lquRQq0diPgRAkvtGgajfe/uklhOVkxV/23vraqEBw==; 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-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=hIfAIFBvWfwypCTf5wFzQrHY2ZzLq53jvqKJAuwj0wY=; b=XTHQnzwyohLbLlt9F0X8DQ24uK P0axVPRSaxg53mj1VBQsuEKo3SxgkO2FKNsN9kgLJplFlRY/zJnTLTYdWJRxkTa1jQnjoj9HyX4bj n+vF9USCL+s2IR/sMGfGWZZngowviAB/bwXLUQbKoIMzB8joHNYuv/Z0DDbvBhI8bSdWHDtr0hgb5 XbHysSreCgJsW3qAa/6dVQXbq4mdr7sA3wiMBASyrrveMOWLbFoJa6Yan3XFgJapfm1QM3oBg/QkD 23K2UKPPDVN8DAneIOsfUlRKeZQUfDXM/zUt7H7DkniHD3/1tLboanrEKJvq64g4OTq/LO5OkMNjQ 1AEgKrRg==; Received: from authenticated user by zero.zsh.org with local id 1l9fH7-0009u7-4s; Wed, 10 Feb 2021 02:30:41 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f180.google.com) smtp.remote-ip=209.85.167.180; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oi1-f180.google.com ([209.85.167.180]:40513) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1l9fGw-0009lp-7E; Wed, 10 Feb 2021 02:30:31 +0000 Received: by mail-oi1-f180.google.com with SMTP id 18so422677oiz.7 for ; Tue, 09 Feb 2021 18:30:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hIfAIFBvWfwypCTf5wFzQrHY2ZzLq53jvqKJAuwj0wY=; b=hCWSSpinA1rnoW6URd+V2H4ik8cWTByBMm7kUi0nnG9AbXnHOApPoLRWg4Fr60eNSf Ix+ggLuwa4p42aManaksMoEm1LFnnv4vqX2gnFj0s56FRufd60wduONRAItwq6dOfk7c hlryukFeRNK0Aci3p9/4dAGsrfupv+xFUYpYfjM9qOsadJDzyfLZidSyCymtl1ThjXfu Q87mRkP38XgJHsZoCYUDWiCCIQmDzCFYAKmpncm2d3LvEqJbOgf08vrPU4dTegN8WBtR kkdSnXNlS4l/m2OuHRDNWuwiD8w0QQ9+k3uirI5QDswBHgI7aQ0Hqhw59230DBW6gDN3 bGRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hIfAIFBvWfwypCTf5wFzQrHY2ZzLq53jvqKJAuwj0wY=; b=A2qUchICa5rIEVmhlHzFISOyCwfaAya3e5klJIIFzm7kbsnPiO+DhDJYz17Ru4kkj3 duy2mNiDlkj1ZsI6l9FSmQq0F16esMVzgbHbbBRoIAjhgMeGIY/AhbSJXMQWAycQgwjE LVBbijr0YlE+INfKv2CBClX2wWs2QCGe//WjZ+T+Rf1S3AlMCbySKbdkYkpaHsxtyBrA Nvb4DTVfrM0MvAMJFDiU7q6QlD6ovBWvlGMk1s0pFHbu2dIZE4Tja1BFCbGwst9kSrdB kiokW/NpXZvBvjNw+2y94m9+HBShn7ZfGky1lR1lWqm+apajXvrYIAx+tRXlE4ziBACy qXEw== X-Gm-Message-State: AOAM533I+tWkYGYbWp3Cu8lYJfFrUvrn+6cwMD832ouEDsShGZBvn4gd o/jXxLHTeuabvC+cOjidEbhaNAlioVk3bDsw8nZAsQ== X-Google-Smtp-Source: ABdhPJyBwJsVGLQUekyB99nYo/HmTj0v8crGQOsCxSerBEMVsA3yDFHOsH+1niuFQZ60bxV6sEbkRfLTJCbYrUjxMdQ= X-Received: by 2002:aca:4e8e:: with SMTP id c136mr588140oib.173.1612924228729; Tue, 09 Feb 2021 18:30:28 -0800 (PST) MIME-Version: 1.0 References: <0102017778f35f33-a962e4d3-83e9-4d3b-a0d7-45701bb40b11-000000@eu-west-1.amazonses.com> <8BA25288-0FFB-4FF4-9799-541D6A3C52DA@dana.is> <19996A10-103F-4054-AD57-FCED8E406687@dana.is> <86782FA5-6EBB-4FCD-90AD-D33F352455F1@dana.is> In-Reply-To: From: Bart Schaefer Date: Tue, 9 Feb 2021 18:30:17 -0800 Message-ID: Subject: Re: Rewrite of zsh-newuser-install To: Marlon Richert Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47990 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: On Tue, Feb 9, 2021 at 1:42 PM Marlon Richert wrote: > > https://gitlab.com/marlonrichert/zsh-sensible/-/commit/3d867257b7dcdb7826bc07f44756ba30bf539fda?w=1 > # %F{x}: set bacKground color to x; %k: default bacKground color Typo, should be %K{x} > # $(( [#10] x )): cast x to int; COLUMNS: current line width of terminal Is there any advantage to computing this with PROMPT_SUBST versus, for example, reassigning PS1 with a new width in precmd? Anyway if you're already allowing the dynamic parts to consume 40% of the terminal width I'm not sure it's worth the effort of making them dependent on that. Just pick a width for %n@%M and a number of trailing components for %~. > add-zle-hook-widget line-finish :zshrc:timer See previous comments in other messages, but if keeping this I'd put it in preexec instead. > PS4=$': -> %(?,%F{g},%F{b}%K{r})%?%f%k\t%e: %F{g}%1N %f%2x:%I ; > %(1_,%S%_%s ,)%f%k' The :...; trick doesn't work if you have an ">" in PS4, it becomes a redirection upon copy-paste. I don't think you need the semicolon if you have a newline. > # m:{[:lower:]-}={[:upper:]_} does zsh-name -> ZSH_NAME Doesn't work for completing parameter names, e.g. $xdg-TAB just beeps. Is that an issue? > typeset -T LS_COLORS ls_colors Per previous discussion, I'd protect this with a test that LS_COLORS is set. Unless you've setopt WARN_CREATE_GLOBAL, the later reference to "$ls_colors[@]" will be harmless. Speaking of that, heh, there should be a warning comment (?) or something that all of this expects to load in zsh native mode, otherwise those naked subscripts etc. will break. > () { > local zcachedir=${ZDOTDIR:-${XDG_CACHE_HOME:-$HOME/.cache}/zsh} I wonder if it would be less potentially puzzling to use "function {" here instead of empty parens? > setopt AUTO_PUSHD # Go back to previous dirs with `cd (+|-)[]` or `~(+|-)[]`. That description doesn't seem quite right to me. The behavior of cd doesn't depend on this option; it depends on using the directory stack, but you can do that without AUTO_PUSHD. I think we've commented regarding everything else. Thanks again.