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 1534 invoked from network); 11 Feb 2021 08:30:37 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Feb 2021 08:30:37 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613032237; b=pP3iLfKNGwanctq8Pi5gJHGzABRgtLJ6rLN/xeUXDaSTOFgTmo4PfxEBq5nOSzek+mf3Q/m4Se QIh3y15yADYJ16Aznu+EX7qUUT031x/fP7AFsERSTLAdlkIswmc93PdbnBxQYITgi4h0Sw5N1u 2dVq+tuDVwxnAMZOFdN9sRfNoHwkl2i6GV4n5F9cLa7xRe4lSbViDnylKoz78OhTTBUT8SXzYg aA4NVbvzlqYofA3Cd3/T1NsY9vC4x3ZamtsSa88i0eFPuQWC/GsXswM9L+HevCfD08vM8nWMEc ppnSgnLoOkU8NtRo7A0O/rXChPi1opE5b6yKilrINhc6UQ==; 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=1613032237; bh=EIohYI7UI0F/TQa8U0NvBL8FxQqPPVeWTP9U0zM6oCY=; 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=eA/N3FN45OgpeTTJQO4Pvqs4cuT5fU4JVA4JWKhDQCSx2GFAfzMb/6WJ1PuUmdvw+AMiqQjoFh uCESl8jtxz6uYTp5c/tj6e+FGYsvXZJcsjhqD1d7yO4NxCsizMBiBILEgbL5kB0Atlnhr0aCnP m+wZn39UAswSZ0l8zeQU8xr+IvTuklPTLG1ve6YA8idmaDYCP/ToUp5xKuhrYsD8rgul6xxpl4 Mylaoch4AyuGn3pmk+fiMio6SU1Dq9N1z4bzGNeiIIArdgbvpM27FQFe5eh+LXbabaxLZAyL4m C2qMOyZiFWZLAPuktPt5ZuYj6z9s5jyhaT0+5XA9zJK5Mg==; 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=Zcj2yJvfOiMeMGX5IFquzdypLiPNhb9zvHvt2+/I8PA=; b=Vq79upGHj2ICTqvGDgPU+JMId1 bj/GpZUAwzmD0dtZd6LcbqllV2N/hGbyamN30KtowqJ2Z0Srd3IXgXHOCIeN6c4FauiID+R2DLWs0 PZGL4QyE8qXpw7HNu8bjRYNW0uWkbGkgmeBRPD1GIoX/ci5+3lEmCMwKf7PHeYuf7IamliJ2WeUm2 Yp8qllsqKwiZ4EdCmiYL6e/TVb/CatK3/diYozz87Eqrn3+sjyZh7KK5T6yrbtOk21zhAKWnhbB2Z 3B05A6gkWyuQnAGL/zrkFlD4rBwB+zBeM8Pr0R2+r5KEEfzyVqzEFPdASGmYuVJIjuv+nOSsMtYm5 GpTZeIFA==; Received: from authenticated user by zero.zsh.org with local id 1lA7Ms-000Hba-Dn; Thu, 11 Feb 2021 08:30:30 +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]:45563) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lA7Mc-000HTX-5i; Thu, 11 Feb 2021 08:30:15 +0000 Received: by mail-oi1-f180.google.com with SMTP id m7so5195597oiw.12 for ; Thu, 11 Feb 2021 00:30:13 -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=Zcj2yJvfOiMeMGX5IFquzdypLiPNhb9zvHvt2+/I8PA=; b=NnzbfLbZ/AQDU3NgsgZJz3LIXTQDIwlBw0ipHRRoF7HaCyyGzJ4ow/wDqxvPmweE06 TsIDcepfgl53Va6/vLe7ySX9EaThhz//qQfi5UgMyD9f/GNCYetnGJlLI6acFukEkqBH 1qnj1/vAyddldiiTs6TMpDjLYpw8vw/GRtaISyN/FcjRwJj/bd3Lxd7xYJbu3ErZsFT8 0N6X6ayDoP2FgxcFBex4tJi+3wXGEXbsa2SDFAP5JiI3tRh946AINqrWzmu9Qt8+ky3i LrOpArXivZMejEp9KSfWoPTjSVspEtjkGOXt7HlSTRXs5F1N9gLUWqSZPtzkIrFu7gfv BM3g== 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=Zcj2yJvfOiMeMGX5IFquzdypLiPNhb9zvHvt2+/I8PA=; b=T53234Oo1YegCa1MJO/aICeOBF3utSeFa/i8jbN8r2ooPSxSwIWIGXs5HRuyPy9NyB wqMIpWHqhusSgYrGyKN7pxh4D5Csik4374uD9cnoLl7pbmmbTUWKEoeEj+GY2FJq8nt/ HZzaZgDB25+gcioIntgbEcPawRKEMF9BzSmHjM3rrnZmgxwt5De+FwwqR5uDk4TiiCY6 rE9KR+jjepD8HqJrJIjR+G58X3GC1LkvnL/HcqReUhWJiX+x7ZYlIbzuwO/U3B9zsu+/ /YIfvRSZJ/SSK3xXHdjQWroRvj2eBpUZBHGd5jRR9nSKdys8XzqFisT+ZCX+uH1DRzkM lQ8Q== X-Gm-Message-State: AOAM530t211D3EsbXQgY0miurGjk9EKRMxm1jRU2TZEWbEEDimpMah1Y LMCOFGDJy4xK/jwsYiUZc8C7Q0PzySt/7I7izZ+9SdFWd31anw== X-Google-Smtp-Source: ABdhPJzdvQgkYRQSPDPxN3Fdk3qGM+QnHzkIOQnq/Tm38e2lVR6aC7MUxibCtF0QJQVY00s1S4Sa1lYTVbJOvXkzQ30= X-Received: by 2002:aca:808:: with SMTP id 8mr2008840oii.84.1613032212681; Thu, 11 Feb 2021 00:30:12 -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: Thu, 11 Feb 2021 00:30:01 -0800 Message-ID: Subject: Re: Rewrite of zsh-newuser-install To: Marlon Richert Cc: dana , Daniel Shahaf , Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 48001 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 Wed, Feb 10, 2021 at 12:28 PM Marlon Richert wrote: > > New update: https://gitlab.com/marlonrichert/zsh-sensible/-/commit/85db3c0f8c6abdcfea12017b1ba7d5d81e918490?w=1 I'm a bit embarrassed about this, but felt I should mention it: > HISTFILE=${ZDOTDIR:-${XDG_DATA_HOME:-$HOME/.local/share}/zsh}/history My own zsh history is in $HOME, because $ZDOTDIR is maintained with git. A file $ZDOTDIR/history file is part of my shell startup, sourced from .zshrc to set up the collection of history-related variables and options. I also avoid incremental history and have a shell function "die" that kills the shell without allowing any history to be written, so that I can manually control whether something I've been doing is saved. It never occurred to me that $HISTFILE would be set to a name that did not begin with either a "." or a "z" or both. Consequently when I sourced the sample zshrc to see what the prompts etc. looked like, the commands I subsequently executed were incrementally appended to a file that was then loaded the next time I started a shell, which fortunately didn't do anything but alarm me. I've now made everything in $ZDOTDIR, and the directory itself, read-only. This is my fault for not re-verifying that the file locations in the sample did not conflict with any of my defaults. I point it out because something like this is one of the reasons that zsh-newuser-install asks questions before choosing file locations, which is part of what we're supposed to be discussing in this thread. Now back to the recent changes ... I don't actually have that much comment on the recent changes ... > autoload -Uz compinit; compinit -d $zcachedir/compdump I should have thought to ask about this before: Why is this changed from the default location? If we feel the default is wrong, shouldn't we be patching compinit? (Oddly, compinit and compdump disagree on what the default should be.) Incidentally, I append -$ZSH_VERSION to the compdump file name. > zmodload -F zsh/zutil b:zstyle # Load `zstyle` builtin. Hmm, I wouldn't think this was necessary after compinit. > zstyle ':completion:*' completer _expand _complete _history _correct _ignored Did I miss the reason for removing _oldlist? Speaking of things I missed: PS2='%S%_%s > ' # Left side RPS2=' < %S%^%s' # Right side I would suggest that if we are going to use RPS2 + TRANSIENT_RPROMPT, that we set PS2=''. The advantage to this is that after entering a multi-line command, all the prompts except PS1 have disappeared, and you have something you can copy-paste, which we've been striving for elsewhere (e.g. PS4). That's really about it for this pass. I'll try to find time tomorrow to respond to some of the earlier discussion.