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 21018 invoked from network); 13 Feb 2021 22:56:34 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Feb 2021 22:56:34 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613256994; b=PILXT13Qwy0oTXaXqMsa7kbAjl3ZnWgQBdWePVWUA7WZXdb2/zgbvGcun2fECpQ/CMfKZ1Ku+M lOZnSi6qqk0EwxHnuoEEmx9vANWEBoox87bbYuNWdAYc7m/H4b4Xsj4cyUNmSnW7ugsem7YTA4 QzaY7XPxrid4ET/FXzHk1DxXVg+oWS5suOCroc3UTuI0FPXvWVHvBhkT3wOTZmW5/TIcYSVrq9 V0YPyVC/MtqWF4pnNNr8YPk7JXLn1gipwh5oSboV4ftbHOeFijWhe7a1G5C2HIYUACztC5gceX T6eXARStP6b65UQh+9AsiCQBp/eTngWv35Wc33OBCpJjYw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f43.google.com) smtp.remote-ip=209.85.210.43; 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=1613256994; bh=aOBEninQNketslIoIDhM67E2QzlUUC5oc1mALRZ+jaw=; 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=dkvWpiZs85lvW+r2SMmirXXkw0Pga/bRO9it/4jcShPjlmWI+8tOlrbCsEnrWRG/rKlz3sXNX2 bz9+4oQJyoWN1lE6HqOtgitwnHBX4j4tkMd+sesk3jpXhad8D6IvOu3KboOpvKc05DFKo7Wthp YdksBHDFzoAC6Oa1i+YPvDjWnnSwDD51QysFt2n0kzjx2KdPB94e8gotRYjPWFRL2+I7dz+Prd htiu7wJFmiWREP3ztjHcAYXzSXCkLtnRaRmgI4KKVT9Chl+AHRDSQ3XYm92U6uwHYq4bTq+7LG WJ817nE+gtkHnzJV3QULug8zL/uxzRgKOQcmDXJtmsxrEQ==; 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=QWe2c9H9cVrjAxxDMEKHBb9tea+Xld7UbenHjQATs10=; b=AOAUzNKMBvxMryccbj7D3bHTLP sqZRDpaimfLYoROegc3n5WxFmvki87oqg28ZnB9+9oUegaQjFL5KXPGaakEujlmaWOIFazZXlSOsN AxIY0dcJaZvE3AETOW5ehQy9jH/KyVWURB8l0XMyyuMUCws1+L7UXbcb6mE5c22eECdYXioUC/oED AzT4MsGDNdA64lMPVObaX922P6TUKmaTB8bTSozG47f8roU6lEEOCO9Y/GtC/tel26okEcsB5G+xF 2msJvL8WiyoGUb6aDG3bfQVSF4VwFQAufhMrxyjgWuci6RwTg8xHjjPY626Mndin6dGhnj2N6eD46 cBD1f8QA==; Received: from authenticated user by zero.zsh.org with local id 1lB3q6-000Ko1-59; Sat, 13 Feb 2021 22:56:34 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f43.google.com) smtp.remote-ip=209.85.210.43; 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-ot1-f43.google.com ([209.85.210.43]:36385) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lB3ps-000Ke4-J6; Sat, 13 Feb 2021 22:56:21 +0000 Received: by mail-ot1-f43.google.com with SMTP id 100so2802466otg.3 for ; Sat, 13 Feb 2021 14:56:20 -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:content-transfer-encoding; bh=QWe2c9H9cVrjAxxDMEKHBb9tea+Xld7UbenHjQATs10=; b=x3s+NTBXXBv4BSgiFDeEm5NftPiDVwAy3NHYvILeWQNgdb5gyvsS+6CPJCgtYTGoc1 wQ0JTzsMbkpVbHQoAc4U99yZT0oF9uPEcliJU35JSbYj3e+JIoZMEywezSs4dusmdV71 ubalVRM4Tz+atYNImb+/1F3wHNHT/8FdLNq+GEDG2e4ASLFwYurnmJn5g9zbKXBo7dtt lfFviyvOIDZjYSx3vuLqMCtAoPnTuyB7eEa9f33T3F5BXDzFhjeDddK1KClkGkcjWE/D 44w7Las7+YROQbddhFiD5IVSWPpzCom3UN0eK4eAcizgpAh8K5M2WYbNdjJYHDEjpyYr /SdQ== 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=QWe2c9H9cVrjAxxDMEKHBb9tea+Xld7UbenHjQATs10=; b=miEL05KpDg7lwDZiHb29cQcUjxURBJk0bNU2AxHPfVVF5hYKkl8A4GsL0DJmR5kKuG V91drc9iikWD94zN0SBs/K763xq0itzTv0EF+COo46+KJSTla6EcD64M4iAcgr18jjYZ RCAt7pTseIQzD+mmu+lH9nx5Tsn6ztA69TSuf1xwfJCA4E4FtrzAM8Al9nIaeyTJKg+C kErZa7NnaEmlXJjcGKoRY5YopMQQdcc9vBJt+ovrqrcugftq/1Z+Dj9soD7X2oLC2UQa PzGX1Rlb4wjMOciadyV58TwI3/oKWZUKXSuDARA+WtbJeL3vu0sSQkw0DkFeFVOWu9VB nF+g== X-Gm-Message-State: AOAM531L98OuuYhy4OJA4twJ/D159pbC3CyawwbHGLt1GVy85cVdlTmf LmzIg6vReswXvrvXMENQ4lPjpdAwirfzCSonquRtcQ== X-Google-Smtp-Source: ABdhPJxYMSaJgyX825QLV+y4E1ZF1jPY1JKyDgcMj6uyHGJ1/YuvJG5UW6Ux9l7lTsTIPMV+jr9Xg0wLvEr1uH6/GHc= X-Received: by 2002:a9d:6358:: with SMTP id y24mr6711481otk.229.1613256979439; Sat, 13 Feb 2021 14:56:19 -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> <63124-1613172369.335393@kj4H.lfui.ly3G> <67415-1613180201.366561@nSDd.R0ox.wLYA> In-Reply-To: From: Bart Schaefer Date: Sat, 13 Feb 2021 14:56:08 -0800 Message-ID: Subject: Re: Rewrite of zsh-newuser-install To: Marlon Richert Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 48042 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 Sat, Feb 13, 2021 at 2:27 AM Marlon Richert w= rote: > > Is there a list of which modules and their builtins get autoloaded? I can= not find this documented anywhere. Src/bltinmods.list For example, the following means that the builtins ("b:") named "limit", "ulimit", and "unlimit" are autoloaded when in zsh emulation mode: /* linked-in known module `zsh/rlimits' */ { char *zsh_features[] =3D { "b:limit", "b:ulimit", "b:unlimit", NULL }; char *emu_features[] =3D { "b:ulimit", NULL }; autofeatures("zsh", "zsh/rlimits", EMULATION(EMULATE_ZSH) ? zsh_features : emu_features, 0, 1); } (Hmm, I see that the documentation for "zsh/param/private" is actually incorrect, I changed "private" from an autoloaded builtin to a reserved word and forgot to edit that paragraph.) > Should we perhaps add a function that does that, to save the user from ha= ving to remember this? Something like this: > > zrestart() { > zsh -nf .zshrc && zsh -l && exit > } > > Not sure about the name. This is not a bad idea. I agree about the naming difficulty, but don't have a good suggestion. "test_new_zshrc"? > > > I already saw one error where add-zle-hook-widget > > > failed, because zsh/zle wasn't loaded yet. > > [...] this was with the code copy-pasted directly into a .zshrc file. No = zsh/newuser involved. Hm. zsh/zle is one of the default modules, it should always be there unless the stdin is not a terminal. > What about using ^Z for undo and ^[z for redo? That's similar to Cmd-Z fo= r undo and Cmd-Shift-Z for redo in macOS. That would be fine, I think. > Although, I'm starting to think, given the amount of custom key bindings = the new .zshrc includes by now, would it make more sense to introduce a com= pletely new keymap in the C code? This is possibly worth considering, but you're adding bindings in a bunch of keymaps. A compromise might be to have a second file that creates a keymap using "bindkey" commands, and (optionally?) load + switch to that. If it goes well, then we can add it to the C later. > Sure, but compinit actually checks the completer style to decide whether = to rebind ^I to complete-word or leave it at expand-or-complete. So, then a= t least that style needs to come before compinit and then we have to zmodlo= ad zstyle before compinit anyway. Again, no, the main shell should know from link time that any reference to the ztyle command should pull in the zsh/zutil module.