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 23619 invoked from network); 30 Apr 2021 17:28:23 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 30 Apr 2021 17:28:23 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1619803703; b=zp8sp8lkxgvXm/450+sVCHIOH806reg4w77Iq0+kd/3ddiAz9FN8SEDXDE7wW/A3jI8HT4JWqo B5x/ZEc1O2fV1qlauGr1u+iKplO+1aL0kKzoFhrB5dlOuTl61j9NvYIo6x9593YvpHr0w1GpmJ I8qDWyDkHh5B0uPXR3Lkizby+24K0hWhZiJsimWwnJd/abA5Pg+j+QokWgVFsjiB+MsTIl/WeA ydhn5fAW1s/FTVLvLhy8gFfsEpzAe3OsXED8tmnNOaz0fkfW3TcX/pnLxEoF6RHGckw2UtHGTH MT2JNVGFtT+23gy8eoIw2eA1sWz85IxS4Fae5xv/1cfg7g==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lf1-f46.google.com) smtp.remote-ip=209.85.167.46; 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=1619803703; bh=pz2wqS5t1yB6wacDOLHJweH+GbQK3FeBblB3a/wqMRI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=0+BfXm+HV5U8v5hRMxmt5V/pGgH9pqEeTDA9AF/MwBasDJ4NPp5xJO73b3JvNPzIFalpaXJza9 4hWvx4n8SLdPTdejKQ8CTlb9obX23jL9fQpFLGN+69nqnTjeELRsTRXp5VetKkqOcFNbEEpYVl 81hdSQfQuSAf0+UOCEdkB1bGIDCpVRpRtYRs3nBDwkzWY/aL4McFRuyP9boeDO071vQWh3y8CY swRRe9zkdCx/7OIwFVvkOdxdtPADEbnp3CFK9b4wrv0SUSfk9R9M/yntm0bXUnyVVGOaQMu0pY LyEetr6RVUcY/6sOjvGYOmUx+wQ/9mmufTJJpt8EpoB32g==; 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:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=dOe7RuGF2DYGdNbhq1wT5lpIAuA5h+jsME0haP+AtWc=; b=l+WsmjYQTNT6su4vW0+VeJYWMs 1CgfmFMkgPpmMBNajofXWuHbuOWHJs5FTsFG07WA60ixu0rbLVzYV4v4G5WSQ8ODBMeyUEdeY6f/I sBkVhzw5bZS7fa9sZZKtvtBXcEIi+tEx0/v6dt2uATB77eYWtlU5i8I5oKV7TMEdxC/HoXaOFtAy4 OzwU9NRdHYvmiFz1R0INuAJQUu4aCpGtWMrPJ4Hvp0qCzCvT6YLxSnw/gdkWJFlwOYtyZ4h9+gQYb +3RUikxA6MOU9PdBCQC3vAWKuuAZ+Spvl/bPrjwu7bkMHCLe8EypzeI/zKGdwfZRnGdkORE1KgVCa E5b9nAoQ==; Received: from authenticated user by zero.zsh.org with local id 1lcWwA-0001xj-OV; Fri, 30 Apr 2021 17:28:22 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lf1-f46.google.com) smtp.remote-ip=209.85.167.46; 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-f46.google.com ([209.85.167.46]:38588) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lcWvb-0001hJ-GR; Fri, 30 Apr 2021 17:27:47 +0000 Received: by mail-lf1-f46.google.com with SMTP id 124so30216198lff.5; Fri, 30 Apr 2021 10:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=dOe7RuGF2DYGdNbhq1wT5lpIAuA5h+jsME0haP+AtWc=; b=deaXwfsW/8EfxMWX+j3jvgMQLaiixoBUdUyZFQqSAX2wRwNWdU0AQmYI6DvBEfypgj tVN+reuwxLuvcqMY+XLMF7dLy02fM/DDaUlSwFokQMV5CCIlNWtlFDF177dBlKP2oaKP wgK1JDNYqOkz/qpuRVdaVIijW0wCcDa7AIoPxxF8tPZcyMExQBA7G3BkiVjTUhWNGHKC pkQHP78UaIP8IbnDFSfyxzVYIt6jSn1I2SjSSQypXk5PJK/sIE/bMGaGPSx28eLoJhac cvhPVIz1eS/YiLo7vzU10vNYbnbzN7w9Mm34ApCeWraTi+DrIzF4CJY2a27yWGGIqndH h03g== 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:content-transfer-encoding; bh=dOe7RuGF2DYGdNbhq1wT5lpIAuA5h+jsME0haP+AtWc=; b=rbZJgqClkR2t4XIrp8oCH1MBHaENJGupXsPjNMuqrE2/ENqSnCkpwgoW52RTfWku17 kct/55+CCNdoNE/xrLeyRZobrs3FFcfF9OUfmsluyPAIA2+yjTy54oHSQZCCNUJWlgop tIsIvuk5VcPL/McfoeSnLoh0/DdEejFJLnUbardGe4u2lKfmAQiNGiNFMsPZoc/TES1y 4TpbPaS6/uwm9j+gaSqlMk2rBEvzDy6S2E45jqt+/kwVuyFMi3YjzXVwEdoRwQzkovPX NomVh/cyvaVg1vs41w+ZrDEJMbXxryx89+cQ5UyWmqeT9gVOFpkIdU2vSDDEhC7sTeW3 phyQ== X-Gm-Message-State: AOAM533VGCpZD8ZKcY3pRy1vve4k56yPGXAU9Gbs1bH832/CvMIViNhH zOlboGyj9tMQ2L5FDCOXgT8PFMqrX8EWhM3BcAgu9l/8p8my+A== X-Google-Smtp-Source: ABdhPJxtjR3rkMFym5xg+Hs+5Xc8zV6/Oa2Ipp7pfSvhBT/CO0ksy662Bu2EWj188GZn1psGDUx2bqetJPckR3FFB1c= X-Received: by 2002:a05:6512:24b:: with SMTP id b11mr4014629lfo.486.1619803665632; Fri, 30 Apr 2021 10:27:45 -0700 (PDT) MIME-Version: 1.0 References: <20210426032200.GA26443@tarpaulin.shahaf.local2> <20210429141209.GG28063@tarpaulin.shahaf.local2> In-Reply-To: <20210429141209.GG28063@tarpaulin.shahaf.local2> From: Marlon Richert Date: Fri, 30 Apr 2021 20:27:09 +0300 Message-ID: Subject: Re: [RFC][PATCH] Add zrestart() To: Daniel Shahaf , Bart Schaefer , Oliver Kiddle Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 48752 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 Thu, Apr 29, 2021 at 5:12 PM Daniel Shahaf wrot= e: > > Marlon Richert wrote on Tue, Apr 27, 2021 at 14:37:30 +0300: > > I think your observation is correct and I was planning to fix it in > > the next version of my patch. :) > > > > When I don't reply to a point you make, it means that I either agree > > or think it's not worth arguing about, and I've put it on my TODO list > > for the next version of my patch. I was trying to be brief and not > > post a bunch of agrees/will-dos or quote unnecessarily. But if it's > > prefered that I do respond to every point I agree with and/or quote > > each part of every email I reply to, just let me know. :) > > When you don't respond to a point, it's not possible for the reviewer to > distinguish the situation you describe from other situations =E2=80=94 > especially when, as in this instance, the fix isn't obvious. (proc(5) > isn't portable, argv[0] can lie, etc..) So, it helps to be explicit. > > But so long as we're on this level of detail, it's also fair to just > acknowledge once that all snipped points are agreed with and will be > implemented. Thanks for clearing that up. I'll try to be more clear, next time. :) > > > > I originally had `zsh -fn `, along the lines of w= hat > > > > was suggested earlier, but that test can fail on a valid dotfile th= at > > > > uses dynamically named dirs. > > > > > > A minimal example of this would not be out of place. > > > > % zsh_directory_name() { [[ $2 =3D=3D home ]] && reply=3D($HOME) } > > % cd ~[home]; print $? > > 0 > > % print 'zsh_directory_name() { [[ $2 =3D=3D home ]] && reply=3D($HOME)= } > > cd ~[home]' > tmp > > % zsh -fn tmp > > tmp:2: no directory expansion: ~[home] > > % > > Thanks. Is this a bug or expected behaviour? Well, if zsh -n is intended to be used for checking whether a Zsh source file can be parsed (is it?), then yes, I think that's a bug. As for your other points: I don't really have anything to comment on them, as this function hasn't been my idea in the first place. I originally just had a note in the newuser .zshrc telling the user to use `exec zsh` to apply changes, rather than `source ~/.zshrc`. However, in workers/48026, Oliver expressed apprehension about this, to which Bart, in workers/48031, suggested a different solution, which I ultimately grew into the patch submitted here. Perhaps the three of you could discuss this further?