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 31775 invoked from network); 9 Apr 2021 23:08:54 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 9 Apr 2021 23:08:54 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1618009734; b=WdM0mq/WnNDKZazpAh/C7HP9oB4qFyromteDgiEI1O9xzVtXcwDzP3wzd3RaOwcLeWBqViHRsP 7JD6v1lEg91gQJ2kfa/X4fwI02+knlVibbjBlu3+DaklLzlix9FYhxXRkWJftt+uMY1I8IXcie 7UQaXonuuJbKCMQy3u4BkrEBuiPUI9Z6YcreyaLsyn9LonJ7zkuM4M1sHCrUITeN9nSjPbnReU KZZJNdXBCRMULJYyPX1kLgivPWM3BtB8gcgC1ZhK7aGwbocSunFSOShu5dux4/u/CQY8UsuAJf 92EXqaXQ6EMx5eAls4Sne60CUEZ2+8ze/U3/3LKuKJufBA==; 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=1618009734; bh=VcXl9enBBBgXpHQcfqSR1hItOCOQKmNhYCJ9t3hkteY=; 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=Gcxdi1Td7sgCo+nALmCFdyfXWqkJY+WqnEzusG/bKLjxytOVW0J531DOyDQ93CLPrGOPXH6Hk6 aScZPi0kH7GbYfFIavn2Qw+FA9xHjg5EMmK2pdwdBIHJghTItmZudxTx9lwlp5sFjeINFoT1N/ WpCXVGw19GsT7NCtS5QKJ0EzkCisneTAn8c0uZaQQAOT8xWJ7DeyV8AHU8DyVhC7VIQb7Ag7qu kdD2HSFA5nfgkPychsPi080L8bxuZwVZQBJYgjL88Jqb1BAHnHFRXyPtjAKNvE8z94JByqxjCa 915nNUPGfOcjkZR+eEM3ovl52cFGreyxm6e3KjEB+oN1kg==; 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=8Y76oeeG9DMhx9Tt46rMOlZorKOiKmv4ZniX5QpDvmo=; b=Fwm960laGm2ilW/lH1IiEDfrYE 5J7AwfwqUO3uWDvmZ94srQoLyKhqfAG5kyzOkQCra866fg0jtPXEVqX8XXddK1OFG5yICVt3MAsFa UX/qji5TgV7dSTJvopIXys7w5/A/FU6QqwnVgSgkEV78fl6HfsHJiyY++qDTV+4wBfv3jB1RyxhhX j7mGBAzg3v9UE6bUbhufzLA+K43lzlZ3oEzEYBEtrVfi9dBdEGPaTNomvH7e/xguKYD1G2KiMZFc6 XeO+HKkROIFOgqlvnSyjwGVzToKDUW2m8Y5QP0w9TwveEgLVa+EdHuzvsb0uflK57+ha9glhGWuLH 5svKUSXQ==; Received: from authenticated user by zero.zsh.org with local id 1lV0FB-000LuL-CN; Fri, 09 Apr 2021 23:08:53 +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]:40851) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lV0Eu-000Le1-1a; Fri, 09 Apr 2021 23:08:37 +0000 Received: by mail-oi1-f180.google.com with SMTP id i3so7398736oik.7 for ; Fri, 09 Apr 2021 16:08:35 -0700 (PDT) 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=8Y76oeeG9DMhx9Tt46rMOlZorKOiKmv4ZniX5QpDvmo=; b=SzbBhPkRaNn9YtOiQvZ+q7625QleP6I3CCjLha3FIqeYjPMHZpj6TepYx7FTTFJg22 TUjYBcK9VKOlHUYKwwtEd9O7lmpfv9vfBhbe6JWG8LpmtvaYDvQ0K1mbfGfQhgD389Kh zT1vF0OoYHrg5zR3a+KUl0Ap5BZa5fLcbx1H5yscR48sKs1jip1r4lRaR02klcoWvsgg VdQHooOMcLJ+2LnkHutppAlmRnlH8OH238t4cowIPUlUNW7yFWlOsqG0s6OBzebqSi8I FmGt3qLErIxwdkCfeSfc6DjcewNTIkcxuZuf5h5JEvQnEDa9dcCSi7cMFIBNNOmYlMYC DJMg== 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=8Y76oeeG9DMhx9Tt46rMOlZorKOiKmv4ZniX5QpDvmo=; b=eLSpQwfn9JgV7nw+g8z9QcKm5uDTXNpQA1rx8/a7ZRmhPhoMVjbAhLs2HNTNGf/Vuy +Up1bBQ6NqMyg1HsML5uezQ7x+GTN+8cUiD+uCZBbYvW+fFVoYDudI4yCFJnNED+LEDm 7kHcpyjym0/gNEpSrnNnga6BeV9FYgtyaJnZymhqt0N4OL1jz6mjrEY8SY64acNoxlcl Q+YEL+0h6WSGvv/OVKTHhuGbj7REznak4wH+E9mgL0i2DWdYu7Qarzdd4uu/Z9LUrHnW gUVjn8ifzYB0O1Tv0h++UnZ7b3H28g5xSopdtN4fSJyQGByQDXs0HrmZNqrLBCIynVOH WGHA== X-Gm-Message-State: AOAM531HLNUe9ZwNCBogqcpWWNvsyaUrpHXaMu9rKV6JmGHgLLRbUmVC akEix6OLnAlXqteTz7HiNsg6KBRwcOFcoHisHCjx2g== X-Google-Smtp-Source: ABdhPJyYDSC+FZcMs4khaEoTZqwdJ/9+3L/wAaBervuNfy29SFmrsRAE/8b7tWOD2W20Kbls7gcaphWL1fSXmAJjC9c= X-Received: by 2002:a05:6808:341:: with SMTP id j1mr11868928oie.173.1618009715143; Fri, 09 Apr 2021 16:08:35 -0700 (PDT) MIME-Version: 1.0 References: <85321-1618005842.162070@01py.d8bG.-OTF> In-Reply-To: <85321-1618005842.162070@01py.d8bG.-OTF> From: Bart Schaefer Date: Fri, 9 Apr 2021 16:08:24 -0700 Message-ID: Subject: Re: Rewrite of zsh-newuser-install (Mikael's subthread) To: Oliver Kiddle Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 48454 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 Fri, Apr 9, 2021 at 3:04 PM Oliver Kiddle wrote: > > Marlon wrote: > > > > The problem is that many new users have learned from OMZ and other > > sources that they should do `source ~/.zshrc` to apply changes. Which is somewhat cringey for a number of out-of-scope reasons. > > originally had a note that said you should instead either restart your > > terminal or type `exec zsh`, but then Oliver & Bart came up with the > > current solution. > > Would it be better if we put the zrestart function in Functions/Misc That doesn't address whether we should employ $- or a conditional to find flags to pass to the restarted shell, nor does it address Arseny's concern about a shell in the "chain" having a nonzero exit status. (If use of the PID space is really an issue, the user is restarting WAY too often.) I somewhat hesitantly suggest (because I don't have a clear implementation in mind yet) that perhaps the .zshrc should set a variable to record that it has been run, and employ some conditional test(s) to deal with being source'd a second+ time?