From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 11E5C2A3E9 for ; Tue, 20 Feb 2024 20:39:30 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1708457970; b=Kfzow+RPDFSiJnXQgH+VxJ3m/STbSgMMEIzdkYGo/NUqAWQ2y1M98wZvE1k0wFdlkqIdd8BNei OpR6r7owX31nkmC5ZF4lE7PfpIzs+nqUsNRWEG+o/dPJBgupSfRGpeT5MDzWY+Wvy1z3EFI34k TsoFrixoLcCT1w2s8bb9CJYjEsG96UCt+CThiwv0wU+1n11Ok7SEHOvjDPPx/T3NUe3ODK9ZpH Ev6mOeixeRwYH/NQ3f6bJTGlZc2d3sQ4B7s7mEv7btBOPF0dkomsl7TZm/ImMF4yqPNWljWmfe Ap0OEOzv97ILx1UJTAqt4n6KXKy9sN6lQ2F0/k8S+ME4oA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (relay1-d.mail.gandi.net) smtp.remote-ip=217.70.183.193; 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=1708457970; bh=HdhwWyfD9FNNMCuGB6nGvHvGnT/WMgFGQU29FXIUfF0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:DKIM-Signature; b=qQFAi8PHntbxic2zNy9Gmkm9BAgm0rIxVaP8j6xEXLrx1MOcZD8HzOThulEx4ocA9yLKaM6Dlz qwb1oCOGnETpBFOU8IgMlg8h3Ysw099Nwg/NOWOfecMGsLvWmaScoWx5KGKn0aldypJh7JVZw5 yzLvPru+Nj4fw6GT1teylJ7+l9W2XQX4RyzzMkz8a+ZOrwBlEpMjLe6IO9WVWuPbJJ+yektFaq Uq6/J2M+iXMixeO9y7ww2NavNvpfRsvToj0bGcIhqIeIqum5yw3c0OTjsbmH0vyW6joPCJixwB d2xERN9pbi+I2qIklDJEnp5qs0LjQQ9/Vp7j1rXUCk3EDg==; 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:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID; bh=BR2TEzpy/8Ant1GyYrtyAMeZ9/Yfn7Z5D17Bk+qG8Y0=; b=fnp1YfxslA9Fk9AyUme/DXZvDi FNkUv3MNqxcaqeLbPmc5GmY2PZrRYp39HbSFinI9E1hhHjvwlMOxQ84fA0KuxDe7uMjioR5EuOwQ6 b9ZOTghpEM48759m8Z+mc26JU2usPxyHOCd2a0Qx1NBG9z0Sp+WuQu0uKuHiRTU52xGzJ/3kyCV/0 me4tQgQRjtZBLvpGP2lohI0KhDwxxzVPUFirsYxQT4ldalJsQ0bHpEyxJLC7ffMhvSDJAA6Sm7KCH MouC0IUsp6f4Fdim87m3Cj+K3hC27mjr1TnDILPAPXnxj0exe7EfXvYiMz3gcVpKkSXFG1gqQtfkI Rp9bvXKg==; Received: by zero.zsh.org with local id 1rcVxi-00055o-6l; Tue, 20 Feb 2024 19:39:30 +0000 Authentication-Results: zsh.org; iprev=pass (relay1-d.mail.gandi.net) smtp.remote-ip=217.70.183.193; dmarc=none header.from=chazelas.org; arc=none Received: from relay1-d.mail.gandi.net ([217.70.183.193]:53405) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1rcVxR-0004ld-Sp; Tue, 20 Feb 2024 19:39:15 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id ABBCF240003; Tue, 20 Feb 2024 19:39:12 +0000 (UTC) Date: Tue, 20 Feb 2024 19:39:11 +0000 From: Stephane Chazelas To: Bart Schaefer Cc: zsh workers Subject: Re: $var not expanded in ${x?$var} Message-ID: <20240220193911.avnmcqfliwltkj5m@chazelas.org> Mail-Followup-To: Bart Schaefer , zsh workers References: <20230113080246.nghigc4givvaomve@chazelas.org> <836025199.2014747.1673889335246@mail.virginmedia.com> <20240220070505.fd6jfbcdldieqv7u@chazelas.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-GND-Sasl: stephane@chazelas.org X-Seq: 52563 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: 2024-02-20 09:45:48 -0800, Bart Schaefer: > On Mon, Feb 19, 2024 at 11:05 PM Stephane Chazelas > wrote: [...] > > That transformation of newline into \n and other nicezputs'ness > > seems undesirable to me though. > > It's probably worthwhile for utils.c:zerrmsg() to have a %-placeholder > that means a literal string. Not hard to do, just need to choose a > letter. %S ? That was my thought as well with %S or %#s (alternative form of %s) or %r (raw). But then I thought maybe there was already something available to print some raw error. Looking at https://austingroupbugs.net/view.php?id=1771 where availability of printf %X directives is discussed, looks like %S is the least likely to conflict with printf(3) or printf(1) if that was ever to be a concern. -- Stephane