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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8256 invoked from network); 13 Sep 2023 04:25:27 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Sep 2023 04:25:27 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1694579127; b=F7cyv0EqlsxL0VAor+nMO4LUdxB4vAr4Yr3kDJFtFvn9rSE+7IKASo5ZwIHL+CHEEblbeu/UVW iwEOFZX15oR2sUvOeqQYdzWm17tJ8VU76L8jffje7w8BAr7FBie4MBgkANfRXLErpAefO8dRwT tNjXKHq5Thfzrao0NrnI6FAChByczmXttTjiEZgwnDcEPMQH0oVSR+VdFIkhZoytBsA2O+QGX3 o8TJZHhQ6uoZTlnmyd+yXi+FgY0P+eOSP9F/1ct+ZY3iWx0U1TE5vMMVrDlikqGwko50PcHDkF hzQh8jQkQgBV0oAmaQSJYKEwUAtpj8kBsREhh3UtsC99bg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f53.google.com) smtp.remote-ip=209.85.218.53; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 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-20210803; t=1694579127; bh=h5ksMZiHECCTXj4yS6TWbA4gZfhjPGU/fSkHTBsZaas=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:To:Subject:Message-ID: Date:From:MIME-Version:DKIM-Signature:DKIM-Signature; b=hkbLfPO31PwA2WQFIyhXAUxVVCPlOGv4Lm//aX6pQZbUKRDuBDYQUR0v9i2LcA9rM7g6eRAC+F fVgDfOuSZMGENnngjH7x4Uo/hnTRWxWA50d4EqsWQpm3mvWk6m5rd1PdqdTb70DCYbu4C56AJj O+OEcCR/ZYFS0hKXsbjo842U5NqCfLtkA4R7KzadVjJD9P6Okw9laGA+XvoN2I1KKejy1hN1Zd 5wvpxLw/iZ7p0PlmB7GShqtS5O1scODgKXou6ms0WXNl7BZIW9T+Vj2iCrLPNAbCuMo05mZoy6 bL+su9XhsJUKB6YQkXmyu3AC+vr31OLLmjaUYbhtr4+7Xw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:To:Subject:Message-ID:Date:From:MIME-Version:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=H1uIYqhynF/89opPBhbswYrc4ELdYVFVpLQztZ8lpsY=; b=abfB2Eu/4iqsywIarPaqOThk9j jb3nnIZCmCyNBuiuL8uilR+cJ/Xox0qSWzVWRNcGWcgGY8Y23l7/um/Mx239p7Bl2gWRqnQjfBVjP hna+W65CXEi09/GaS/NdC1tGHLX+7Jp33xuGcdB3CyNtZAa0BvpDwS/RLSQg8QXfwAeXcNhSg1DSx 4P/gQHlEirIORdnNY9vVt/1JBzObI1aMeQjw61QwocrO8x+SCP+haHitcYkY9n/xGUVFoKnV9B1f8 fW2TP1wuUYAx0XDVXjaTJZGmxyT/3AVil2yRq0WBQFqPFdgu1og4HnHGOUNn67tHW+Q7QJxbuC7bT YxoDqdIw==; Received: by zero.zsh.org with local id 1qgHRO-000MB3-Ht; Wed, 13 Sep 2023 04:25:26 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f53.google.com) smtp.remote-ip=209.85.218.53; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f53.google.com ([209.85.218.53]:60474) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qgHQk-000LrF-Md; Wed, 13 Sep 2023 04:24:51 +0000 Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-9ad8a822508so171962966b.0 for ; Tue, 12 Sep 2023 21:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1694579086; x=1695183886; darn=zsh.org; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=H1uIYqhynF/89opPBhbswYrc4ELdYVFVpLQztZ8lpsY=; b=vI5RDeerDbUbOMkR+jcCouLnjJiqtUq7HnpiGzLiSa3u5LLz0S2IIveHHJ4H0LtkoQ 1l2iB+ViJz9plVHFwgvqmuZ0jhkWeffo41BcUDTUt++X6Q/OUI80FdFhjOsPQM+ri6pr B7U0kwuy95igJ97CXAgw6X1WxJKsyrnTmjnk4Rf837yGg/LFZZNq8CZGCWK1fD+YJka4 vkDSzrWd1++kDgXK/aH3TLrQcDOSXEUUc+GR2iYkF8gbTQxn1MFsHgrIdfdaHxhqXeMG OsLBPclptXWGM83S8AMwPhjNLME3kYOEIkvgST9SJy2rtnixA62dpD3jJw6bmFaGjKTe oXXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694579086; x=1695183886; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=H1uIYqhynF/89opPBhbswYrc4ELdYVFVpLQztZ8lpsY=; b=SaTLR3k0lGTF70bWHnOcMN2J0pHinVJ3+/Zpkln6BAfunlEP79Q3oKPZmBH4Ysw2Qn P6G8XVuNYvi8txRpALoWcy5OkloR8CRigIw84mF+F9WxYgGbHgQYtytKr+iPbDxiuwm9 2tHtYTlSPKcK3V7Q51Y8PBSslPhKHn4P3uTzdw2Y+7IfGYKzdI2/3Ug3h11cnXkeJnwd 8MtB79HKi7LIZM/+fOu2ccwAorE1XlxiIkJI7rhXCXv2UAOzpSUGlgQa+qRq4Z9dE/c0 s4KrzVDC4/nMAyj7JlsJ0YXSqETsFxnG5gk06Bo3qgcbH24HIMfXoD0K2IUfXp6mWiKt eSnQ== X-Gm-Message-State: AOJu0YxGXOXi8a/Ig3bTP7WBp4+04Q1QmEwOttljZ+AMwUfksIHUnmbQ KviiEX5mBM1z8dcMSF0F/Byx8HpCEivY2vli+M49tZOsu1aFKHmr94w= X-Google-Smtp-Source: AGHT+IHPrQz5/02BODJamZfotztWuQUv4S8HwOIEKk2/KocKpO0F5sK4uINuasucilqqzduaYd9c+Rzkl8o+oymvaSo= X-Received: by 2002:a17:906:a18b:b0:9a5:cf23:de5b with SMTP id s11-20020a170906a18b00b009a5cf23de5bmr791117ejy.38.1694579086127; Tue, 12 Sep 2023 21:24:46 -0700 (PDT) MIME-Version: 1.0 From: Bart Schaefer Date: Tue, 12 Sep 2023 21:24:35 -0700 Message-ID: Subject: Bug? ignorebraces and autoloaded functions To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52138 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 Tue, Sep 12, 2023 at 8:41=E2=80=AFPM Bart Schaefer wrote: > > You have to setopt ignorebraces before you define the > function. Otherwise the internals of the function have already been > parsed and the behavior doesn't change. This means that a bunch of functions in the default zsh $fpath will not load if ignorebraces is set. As an example, try autoload -Uz zed setopt ignorebraces zed Adding noignorebraces to the local options in the function isn't soon enoug= h. In the case of zed, there are two brace-enclosed current-shell-commands on line 147. To make it impervious to ignorebraces, it's necessary to precede each closing brace with a command terminator (semicolon or newline). There are not many of these under Functions/ (and it appears the majority of them are functions that I contributed) but there are quite a few under Completion/. Is this something that autoload should take care of? Could it be imposed by the -z option, or less intuitively the -U option, or would a new option be needed? A workaround is to use emulate: emulate zsh -f -c 'autoload -U zed' That's a bit clumsy, though.