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 10690 invoked from network); 13 Jan 2023 08:03:31 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Jan 2023 08:03:31 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1673597011; b=kiciIQHvjGmO6sEtz2Qsa2iBCujYMBq+CMU9K+Gkt33nNGNLNv4wRHXzVFB9cdyc5svoZTO5Mf nBSHvvQSm+4jw7r27832R6yfnmL6cdIigMjlLCYVpd5lXcwpYdRxIEMgxvlzEZ3q8ShZrwyY/9 4aVPI0Yb+OZ7L6pryQOoUuGPauyiygvRImsbnmsiEOYeS8pp5SyfMFwECGgY0A+qxWqw5fAWUb icqwmdm0oIhOepLKyQ7h5ua+OsPn8CjY+JuOtAJABgq9sbM+NaLpfeUGxYOC+id9LJgxbXwfBV zjR3YGkeCcKP5IBBnUVvTxs314c5dfncFFqUED6wvH1YvQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (relay5-d.mail.gandi.net) smtp.remote-ip=217.70.183.197; dmarc=none header.from=chazelas.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1673597011; bh=ctDHuM4zpIuLqTWXJw9GD5IR899zRgiboAXHk2UkvCg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date: DKIM-Signature; b=f+SC6/qsII1JQ3gtoMoFz0BUd66omSNzXHxwdOaE7lC0SgiMFBwqVuZhsgozj/OmR6ah4LHAa6 IDkNbj0BSGHmqVlzpZFPsxkbYxX3qvd1jofMWp28WbrWd2aTZ43j/wVQxbzPWj+NO+GQv4hhkB 9mxasfJGDsrJxtnBotksTL9SUNuOie4BGMTt0o+gNu7HFtCS0M7fIYlgf2PbPR1jIPs8flGu/M XFBSQry+IM1G0Ud1yddo5J15G/ZLqgIWsPrs5oJGPOdKL0LqxbmZsxq7LeABaXwiR7x5LK8hjj Ix6VzWMAA7+zIS36MXYduuTPkCD1VhEAeVhkQ2o1qKZEPA==; 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-Type:MIME-Version:Message-ID: Subject:To:From:Date:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=vkLy+NviJl4VmddI3kWna+bXTDDUSeUTDynrNvpQRiw=; b=eecjHBXNK7S7fvy0ZZVymmdR3A l73eTdLCgPssADob7CjEoY+VE3fCnCbHn63klrL+6bICqs/duMCrzEZyZ7gtBze0Rb9nJ5A3niclt p3TuAEj7ssTn5heES+gD9fSRutD8NrPf6+MfZ9iOyVceR5058p9GWUcBbF83dRanobzAAao/fEjWl bpZQKFc9e7JUKVAs6HjoVj+fh3/Vhta+blt58Nz8m3hvyVs/jBppdqmQGBjahUX0wPHrZ7J5voerv odrSZrTl/7a/sdcajYlzkf79br6wwPsHa87+utJofDGRGJpXN1vxdH1t4HF0MU5/DYI6IC9oKvIAN /cOE0EeQ==; Received: by zero.zsh.org with local id 1pGF28-00025i-Vk; Fri, 13 Jan 2023 08:03:29 +0000 Authentication-Results: zsh.org; iprev=pass (relay5-d.mail.gandi.net) smtp.remote-ip=217.70.183.197; dmarc=none header.from=chazelas.org; arc=none Received: from relay5-d.mail.gandi.net ([217.70.183.197]:39149) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1pGF1U-0001l6-Mj; Fri, 13 Jan 2023 08:02:49 +0000 Received: (Authenticated sender: stephane@chazelas.org) by mail.gandi.net (Postfix) with ESMTPSA id E23FC1C0004 for ; Fri, 13 Jan 2023 08:02:47 +0000 (UTC) Date: Fri, 13 Jan 2023 08:02:46 +0000 From: Stephane Chazelas To: Zsh hackers list Subject: $var not expanded in ${x?$var} Message-ID: <20230113080246.nghigc4givvaomve@chazelas.org> Mail-Followup-To: Zsh hackers list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Seq: 51302 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: $ zsh -c 'echo ${1?$USERNAME}' zsh:1: 1: $USERNAME No quote removal either: $ zsh -c 'echo ${1?"x"}' zsh:1: 1: "x" Doc says: > In any of the above expressions that test a variable and substitute an > alternate WORD, note that you can use standard shell quoting in the WORD > value to selectively override the splitting done by the SH_WORD_SPLIT > option and the = flag, but not splitting by the s:STRING: flag. POSIX: > ${parameter:?[word]} > Indicate Error if Null or Unset. If parameter is unset or > null, the *expansion* of word (or a message indicating it is > unset if word is omitted) shall be written to standard error > and the shell exits with a non-zero exit status. Otherwise, > the value of parameter shall be substituted. An interactive > shell need not exit. (also note that line number being printed twice) -- Stephane