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=-4.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15259 invoked from network); 4 Feb 2023 02:02:21 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 4 Feb 2023 02:02:21 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1675476141; b=HMpTiRL/23RmkaB2FAfrx1Y/4vv4diNVGD9Vm3v8mzpoV3uGVB2GQin7Khfjy/eEYPGge2T6+l tqylOGuSHOIhZMJjRqxyGB8NvM103Eaa0hkHRydZLrogIEfgCH37meV6KxhIqRxElIr0Q7nsdl lGVTusSBJl8Vcs4aIBrpXojXIPc7HjOuAzXTHBmFNenh3Lss/agAyc9u40EIwDc9MvdsRP9twj x1HdHczVZSzfi8h7VeKUrgB1dA1h7KndaSaCQUSNS/KljYDDQRHGD0uKSUbPPkh5eDI2MY4913 4cq3qARvBTF76JZk2dUh8HyULPkF7A0nNk5PwfzrwOsZBA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (outerface.net) smtp.remote-ip=195.70.199.109; dkim=pass header.d=outerface.net header.s=ed25519 header.a=ed25519-sha256; dkim=pass header.d=outerface.net header.s=rsa2048 header.a=rsa-sha256; dmarc=pass header.from=outerface.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1675476141; bh=mpZAyKFL1lmGtMICQKSHll9WYkGjKVTJuzXf+WA0lEY=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=GhNrHFzVtlqOH72D7i8sQYgJFjpZOMIoVn0jrFWFThWXjHwEfvPsZj1b+Km7H6hJDQf0eC5wv3 Lzo3aEgo8Dcb6Ux4Lp9u2PzhbaIT9suBIxyFlVWDjnqU2hQhSWskb5roV8STwkC2MHsg0bPhof Ke+ddQFWfaTm5zKcoVKbYN1k0thqk+IPf2Au9BvXGhz/Xcx2IVXSe1lh0fbMDFDJuYp01UCzJI UiHRJi0Upkgc1+Xn2u4iUj0JJ1+oovAGcuGyGW+UA3SSC0qgZ/F+LA60uGlqpc+FqB9yd6/K45 q2VZ+nOFiubteQkdD0duDFYFKcZCM5yCSukZnfim+YaASA==; 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:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=1E4KIrKimQTziBoauvjZ7KKEzHNgrTSh9xq33yECc6w=; b=T7V0SHjsAx6/gr9PpykqYNjvOC B4t4mQsSQ0Ew2wSYsPUuHCVa5lNnFywxO6RpGKhr1X3jQVDtGNEaSC061AJMAXM+mJzeBVLSTRL0T mMcQiBYydwZl5nmSMzF54NzXmXxFlQjI7vHQYnP990RArCndnEYRCZ4+WHMWyojFrT0Ea14Pw4uG8 dtQNYcIzaRxTHrmJxOOj9rb57nPU4z/DIVSU5YscN9up/b4vOAP/TmLSAVI/GCrQwbxJH4B+HvXAO biHAzifzQ1PYOMf3lgbg/HQgcvpx3N0WwPEL1IrqhWUtVt/Ud6W3ueloLrTqoJl646mO8qS3LMdGb Oitd+mAg==; Received: by zero.zsh.org with local id 1pO7si-000Dsi-JD; Sat, 04 Feb 2023 02:02:20 +0000 Authentication-Results: zsh.org; iprev=pass (outerface.net) smtp.remote-ip=195.70.199.109; dkim=pass header.d=outerface.net header.s=ed25519 header.a=ed25519-sha256; dkim=pass header.d=outerface.net header.s=rsa2048 header.a=rsa-sha256; dmarc=pass header.from=outerface.net; arc=none Received: from outerface.net ([195.70.199.109]:56554 helo=mail.outerface.net) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1pO7rv-000DB2-Mm; Sat, 04 Feb 2023 02:01:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=outerface.net; s=rsa2048; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:To:Subject:MIME-Version:Date:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1E4KIrKimQTziBoauvjZ7KKEzHNgrTSh9xq33yECc6w=; b=F9D0bC1GjfTDQ4JDsZ8xiWltWx 5xaekyzXggSyjTEGC6unbXaLp1sLvS2/NE698TYfffn7hYWJewCOQn/gpDh+43OX2S0qyhLd8XuyU lNTNIPKBo+HFpHQy9x+sz2OwIdBroVy3qpNX9lAbhCDqIMo/djrHejgoLpFoR0nKDlo5ufNkYmgab rXjINz40p+mIq/J/++vVIgVAD8E5qDSkqSp5iYV749eMEPDf2AvweyOC/t9pXvPDBeaPPQM/pfi90 n7yX4LMhgPvzJ3DcEXic7sRSu2xyC098u7JGiu5m59vc4cItjYPO/EZjXbytfQtEijAp9x3GlDeOY OVISTb+Q==; DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=outerface.net; s=ed25519; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:To:Subject:MIME-Version:Date:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1E4KIrKimQTziBoauvjZ7KKEzHNgrTSh9xq33yECc6w=; b=nh+9BR2BBP2DgWBkdlyVh57uai 8T7VlPzD8EN6fwhs2KMDhfoivzOfvFrMlUmEhstHIEjk5uWb1707SA9+ZUDg==; Received: from disaster.vpn.outerface.net ([10.8.4.44]:36456) by mail.outerface.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1pO7rs-0000JD-MG for zsh-users@zsh.org; Sat, 04 Feb 2023 05:01:30 +0300 Message-ID: Date: Sat, 4 Feb 2023 06:01:27 +0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: join a string with a parameter value if it's not empy Content-Language: ru To: zsh-users@zsh.org References: <6e1b26963200efd1c6e7ed9a0dd976ded1ab72c9@hey.com> From: sergio In-Reply-To: <6e1b26963200efd1c6e7ed9a0dd976ded1ab72c9@hey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Seq: 28898 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On 04/02/2023 04:20, Eric Nielsen wrote: > $p${p:+_}string Nice! Really I thought about the second way simplification, when I ask this question (: It's more common, as it allows to join several parts. tmp=($p 'string' whatever else) ${(j.#.)tmp} Is it possible to construct an array without a tmp parameter? Without splitting. -- sergio.