From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 3c4e02a7 for ; Thu, 14 Feb 2019 23:45:48 +0000 (UTC) Received: (qmail 8550 invoked by alias); 14 Feb 2019 23:45:35 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23870 Received: (qmail 17630 invoked by uid 1010); 14 Feb 2019 23:45:35 -0000 X-Qmail-Scanner-Diagnostics: from mail-it1-f178.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25112. spamassassin: 3.4.2. Clear:RC:0(209.85.166.178):SA:0(-2.0/5.0):. Processed in 2.498378 secs); 14 Feb 2019 23:45:35 -0000 X-Envelope-From: mikachu@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=xgodTkimhWZbqEPRRJ/MQss8n0JlmQWL7yNV3T46/Z4=; b=GI0zzIXAVu1yv1wk1zrduainGU9u6G+vMDtw0vhp01bx92puxT3awOjVbytwSQcOQx 7rnP8SSkOpSFtiXGEmA8XTKdulVijpjGaoAV0FUEypSjKXIeuMF7GOn+OTLIPsf+qYBL Z1mjTk/9ZUnh1DyamuM6oxDMBh2a562zv6Ti291SCXmdpLQhE4KfFoIljJfJpnTr1Gvt 1mO1/93wRcMU0/Kz+rDpdDC9geHV25kTFpApq9NJ5uRBskKwHeZGRjp9I02KwZEe9Jpr CW0ARG/+sCNOuAta40tAMInaxxP+LwG/HvwQ8USERxreNfbPyha2DOF0tz5y+4cukt7e vU1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=xgodTkimhWZbqEPRRJ/MQss8n0JlmQWL7yNV3T46/Z4=; b=SW57AoSQP54+JysxaUR5KvZS+Wby7DPa9BTjgToe1y0LzDj3k0RH+YJGQVEuxKdsrW dZ/+y+eMMu0WS79IQiiQWOB4mSPe6CzqYzk/wz3UC4jqPyMUsjAFS3ZVLyT1T9+VRh0/ 3acIl2DcE6wzuUJUpY9eWqY2KyQCmH3Bp0kWCDaf7J7S25uGPFFhfVenXOaCn13Q4X1g 9d9fhG8ZzmadUv6qTSHeo1D6PEX4/jVJ/vsd9QkN9Rd7f9/4AIh04ESt6RnVPhMBb0dT 4U4DzK2NoMiiQf2yyAM39qOk7VD8qp4g8I2XsxQbmQknB82NVLQ5SmmgNGKtwtjm8aRN mbOQ== X-Gm-Message-State: AHQUAuZVlVfwMaLGQwaOQutZxaDVtzhBQMl9+MwBjRXgHsTLkZUbPaDa nUdImXOcHjmhSidIecAYv0T4H+oxtOkVhg89dRQ= X-Google-Smtp-Source: AHgI3IZ3AmwtyqR6eYbAolWAynwdGYQPRwNim1wqRx16OdNOxGVXplmVbUwNPil109GtCHVNSihkg+OBUGY1so8Q/6U= X-Received: by 2002:a24:9686:: with SMTP id z128mr3693974itd.97.1550187929541; Thu, 14 Feb 2019 15:45:29 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20190214230743.drgd47wuwapj5os3@gmx.de> References: <20190214230743.drgd47wuwapj5os3@gmx.de> From: Mikael Magnusson Date: Fri, 15 Feb 2019 00:45:28 +0100 Message-ID: Subject: Re: -u option does not work with recursive expansion? To: dominik.vogt@gmx.de, Zsh Users Content-Type: text/plain; charset="UTF-8" On 2/15/19, Dominik Vogt wrote: > Why does the recursive expansion of foo not trigger an error > message with the -u option? Is that a bug? Is there some > woraround to get the expected error behaviour in all cases? > > -- snip -- > set -u > foo=bar > unset bar > # ==> bar: parameter not set > echo $bar > # ==> no error? > echo ${${foo}} > -- snip -- If the above command doesn't output bar, your shell is very broken. I think you're confused about what ${${foo}} means though. Putting a ${} inside another ${} doesn't perform indirect expansion, you need (P) for that. -- Mikael Magnusson