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,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10445 invoked from network); 11 Jul 2023 01:27:47 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Jul 2023 01:27:47 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1689038867; b=RjapWLl+VmxihgYpud0RG+fYdIhqjCm7ccyJbfzMdU0HpV4HokgZoJAr7lggMI+R3og7gZRUGM n3yHsuiv5jiqbwp4tq8vwjclsEawPKxt0PgzAcVa35Bqp1PBQyTiuY5AdolmXdVYU4WGNgGLGB pPwK6GPKxOn+vX8DZAS0cA2RPCrPEkYRMBU01OLwNIj3L1+UG4h86CCShKizXaIVHu7BRV0sDn JMQtpAaujTsrnY2ZP8bNiPrl/YSaQuFMzpaFH8cMga2E7egfYj+raeBWncDosjQhxcPnvO9k/b GPwiGP/GYn9NcQImZ7MY8/zZkdLzyx9ga8rke9eCaQBmCg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f51.google.com) smtp.remote-ip=209.85.218.51; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 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=1689038867; bh=F2Pc9SHq9Lb1FogXM2cVQOaP5tlrpcSjyGO3f5dyiq0=; 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=Moy5zMxFK9HhxKPJE4RiQ2rt+tdTfP9ukP1uHaltZspli0g5xPPgffYkw9vrOCBF4bgdKY4c0t YT7uZdpECtEsyjLCHXIswTS680VGOszLWqVe3Kvk9XwYo+KFozkKoxAlQzL72DDlvLSsw3AL6x ERg1wfTUa0PMlKzgtB1J5mDnmYoZhen/1KlJgzaFbcW4vop80k76Eec13p4Zs4QsxLosBlAstq /eDgJrA/dxMLjDHFrfiDoqrV2jpbKUU+dWnAR6/RKixCe1P4pLmBg3sYlAODqMrZKNjXelRUb/ xlDB8xrKiSd7wWPwth0UySYRMSs6m8J7HUf083TZG6/efw==; 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: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=c8i2R5NQiQH08ygmPxMhriTN8jOOunTqysveHfVkAK4=; b=rW8ybtVvGAzvPBPGwcfB1t40rj udqpwFSAVs9x/Oe5fICz1m0V2NYgDsq0/70t8nJdf3Db4L9IDD+h5oFUb/ANysgKRuoZuM87EZFC3 wm4MNatYkhCO0YglqsPTmZKWQ9oKEFp9a6YQelDGuhtIfQLGqIBFfVW2x2RU6hXapX6wHQMSIPNot 0Oc3uJIsS/8Ji7fqFXqFuQH6Le8AdPDCYNR3rJTmYNjj00IXvxOF36i6XKgShWZRlRxB1ZAzITxka vHn4vAymfkGKlGi5UgEHsk2cAzgAfbgUZA8obPxjoEo1OihTDlM1NJ9y23fjNi7DSo4AAcNCoHKT5 gCAOKI8g==; Received: by zero.zsh.org with local id 1qJ2AN-000AUu-1h; Tue, 11 Jul 2023 01:27:47 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f51.google.com) smtp.remote-ip=209.85.218.51; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f51.google.com ([209.85.218.51]:47295) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qJ24x-000A3j-JI; Tue, 11 Jul 2023 01:22:12 +0000 Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-977e0fbd742so646205466b.2 for ; Mon, 10 Jul 2023 18:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20221208.gappssmtp.com; s=20221208; t=1689038531; x=1691630531; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=c8i2R5NQiQH08ygmPxMhriTN8jOOunTqysveHfVkAK4=; b=qtQwDij1YoqK2p4xxJC9ybHrbqEbimUqC43aXmAMhBqrfPYYcZBe2f3ArbFX2ogxYv lvmX+GliNX5ijZYBVnVLq9o26N6qzeG7pJP74z9mdU7tH9ooCjO2G4PkwDHWg0Ffji1F QheyUImATieI0XdvNP1BpSWRzYzCuSMAk+QYdVL6BYxS3t9lmU4qu1DOUNhCWHVUT8BF /5AV4Y73/3+PxgKZjz152mDlNyDCX+7T7CmA0KlSqdf5rhhOsjh3/a+5WKRd4Ragp7WI EOFi2XfkVDtmYuco509ww03wSpZ+SVcNLZo0Se7e0w3a0Lo78SpA+LJrwYi6u94ezmqi jygg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689038531; x=1691630531; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c8i2R5NQiQH08ygmPxMhriTN8jOOunTqysveHfVkAK4=; b=PGEnLdPjAvWNqg8AKb/scJKyH0mytufwXf2gKO2GcpeQbcj4sDKFI4W5qSz3fUnH16 TX0UWCJURPNim0Mg65OAQqTNiIF40fBwY8zQ93hCx8xQRJ6aEl55ogXA3tiWBsK6o2Mw l20iXsR91gM5XOHtnK4KRzeVjn4995YGHo9W6aiePrZeHAVwyersZhgV/QdolgzEnuKL tspsPf04xWIlLMEhuapVY4cad5zTfL/iUo5HyRNGhQ/kv7dd8agraEIrVVY1uYMloo98 cB2QSVb9RL8ouo7bytqVM7ksLlBSH0w+b9NObBqghKDOD2A94Rut1OLpU6xcRaxs8jRT ummw== X-Gm-Message-State: ABy/qLY2WLb1i6ZLqfHMCr6PxKJrj5nDbekZa/RREAK2igAr5pBvKCSR UWWrhLNRGhygF5lk95BV3WpfQONMyD2ZgnejGMx/cQ== X-Google-Smtp-Source: APBJJlF8T03NZ6k/ZpSmtid4h+kpYWNdXddjfCUJcCZ+vDghoCyqYwF7wAg3958glFfcfAygZwDV1bCNUN7cIhQGM2w= X-Received: by 2002:a17:906:55c5:b0:991:e12e:9858 with SMTP id z5-20020a17090655c500b00991e12e9858mr15267899ejp.64.1689038530730; Mon, 10 Jul 2023 18:22:10 -0700 (PDT) MIME-Version: 1.0 References: <1F241427-C6DE-496E-856F-8C900AA576BB@kba.biglobe.ne.jp> In-Reply-To: <1F241427-C6DE-496E-856F-8C900AA576BB@kba.biglobe.ne.jp> From: Bart Schaefer Date: Mon, 10 Jul 2023 18:21:59 -0700 Message-ID: Subject: Re: [PATCH] Document ${(!)refname} To: Jun T Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51913 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, Jul 6, 2023 at 11:45=E2=80=AFPM Jun T wrote: > > % typeset -n ptr=3Dvar > % echo $(\!t)ptr} > nameref > > Probably something like the following, > "When the parameter being expanded is a named reference, do not > resolve to its referent but use its own value." > > At the end of the subsection "Named References" in zshexpn(1) > (expn.yo:1614), there is a description of ${(t)ptr}. > How about adding a description of $(!t)ptr} here? Perhaps this? diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo index 7bc736470..4285aa4c1 100644 --- a/Doc/Zsh/expn.yo +++ b/Doc/Zsh/expn.yo @@ -987,6 +987,11 @@ means the same thing startitem() +item(tt(!))( +When the parameter being expanded is a named reference, the reference +itself is examined and thus is em(not) resolved to its referent. In +ksh emulation, the parens around this flag are optional. +) item(tt(#))( Evaluate the resulting words as numeric expressions and interpret these as character codes. Output the corresponding characters. Note @@ -1245,7 +1250,8 @@ item(tt(hideval))( for parameters with the `hideval' flag (tt(-H)) ) item(tt(nameref))( -for named references having an empty value (tt(-n)) +for named references either having an empty value (tt(-n)) or when combine= d +with `tt(!)' as in `tt(${LPAR()!t)tt(RPAR()var(rname)})' ) item(tt(special))( for special parameters defined by the shell