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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28390 invoked from network); 12 Sep 2021 08:12:24 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Sep 2021 08:12:24 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1631434344; b=iez3zvmSSwRDnj8+/PDqV0RKLaC23esS+1Q9ytBAGVakcfx/09yI9SqwkqOrh9ug3tRxfJ4HdL zp5FcKk/9nlrOEM3TEcbiIkZG+ku4ePbQHmktjjeVTVjJsXUzEluOGV6K9MJo5O6O+pl2JqHUC BO+nVdgeexaEEH5jMIiOVPDXt5ksE1eqALtnMS/nOejmB+vfDLEaG2UWvgmPUtHjhS6OeHYR5p DlUYdkPacTB4oDByOo22SNL3omAQY4fgBGxeodpXjqmsHBGpALiw4AfZlPrxPxYKOa/m2Hr5B0 hWORs5duTazUZC3gJznh7p/lqKAcsiqCtcPD2XUwXY5rSw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (relay7-d.mail.gandi.net) smtp.remote-ip=217.70.183.200; 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=1631434344; bh=kx/X1rgE8KgtpBwBZK6BApyokCg/hutl5b01O9TvmHI=; 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=pLGL9pTWDdGNRm2SEhZUWfKcmvxhRbh+WjoeVfgQ878h8FHmGKdi8u43HA5vaCUMCiesLRjaeC q+FgfQQuRPZ1Fd+Eha4+cAT+GBHa2uWPsR9m5AmNC/CL0wBqBLrxICNwyacjalVox55aekhkX5 /rdAXmRVA8mtJzNcMRcJnyZvCezR1qkh6Gxk4mMeADyFgaoGVSpZVY8f4adI+j7XRwXif21x9a Bo0U/HH/jVv2asWepCy+BE90gI7QudsyGN2B99qtO2dLHD92k/rMYObXwEeldAPzYUr+VCVEZT t9ni5s16YH0oC1BcyrfHcgmV4W22HbPvgEZNu8WT8PIBqw==; 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=Dcj62Iwep9O1XAeW0iWCpRSnWq+UAjIodbfxnnNZQ/0=; b=kDNXrTrO96W1iCUSU7OmuALLRi un14FkfpCUyuG0uOgEXNZ9lx/Pz6vyi1LXZsfqBPooQwXjM8yIPRQCD7wqv00t8J8Y+GRn46bZlKJ tNQrJW7vUfgIvsUAxcgu6+VNOdIG08ZTnt6jrNTcIW0uc3jeBReCjszapkh7TaA7Bg9ImCPBd8G0F lPXaf/LuTcjdydj300Vom4tEY+kg1c9lMjg9rbIg/TA6N+feEiM9VRg31QoKRxDnWnRQcsB5VM3s4 9MZ9Jhp8/a0OZFY/3DV5KYUYpwbeId/2XACqM2ZGJnLpElGRylF3fCklnc0LOrxkNBX79m38LKkFE M+4ILXpg==; Received: from authenticated user by zero.zsh.org with local id 1mPKb9-000C5G-8x; Sun, 12 Sep 2021 08:12:23 +0000 Authentication-Results: zsh.org; iprev=pass (relay7-d.mail.gandi.net) smtp.remote-ip=217.70.183.200; dmarc=none header.from=chazelas.org; arc=none Received: from relay7-d.mail.gandi.net ([217.70.183.200]:38163) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1mPKae-000BnB-Eh; Sun, 12 Sep 2021 08:11:52 +0000 Received: (Authenticated sender: stephane@chazelas.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id C573220005 for ; Sun, 12 Sep 2021 08:11:51 +0000 (UTC) Date: Sun, 12 Sep 2021 09:11:51 +0100 From: Stephane Chazelas To: Zsh hackers list Subject: Why do we need to quote # in ${(#):-2\#1011010} ? Message-ID: <20210912081151.k5cqsw6tdmkj7mi4@chazelas.org> Mail-Followup-To: Zsh hackers list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Seq: 49409 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: $ echo ${:-2#1011010} 2#1011010 That # is fine when not quoted there, so why: $ echo ${(#):-2#1011010} $ echo ${(#):-2\#1011010} Z ? It seems to discard everything after the expansion within the word: $ echo before${(#):-2#1011010}"hey, where did that go?" other args before other args -- Stephane