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,NICE_REPLY_A,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2960 invoked from network); 31 May 2021 19:42:17 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 31 May 2021 19:42:17 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1622490137; b=XZ2X3YRkFdykg9MxjSkBVGU7fzJ8Mbar4zq0pVFpoUTquv2XZRKlEcy9xCYS58HeJkEo490OhQ lBKHcqxU+XiPl78yeVUwn5JPVKnCgkZ0IgxYABB5jn4qoOKGcM0pjOe0Tw/00CaWGUA5BzCCkk KG+n7o5oXupEFuqfnsOLCH9LmtnBACR3bG23wHUO0B7KCz0+VC4K0QbnRurHcky9xZ/sJl7mAD B94kcSBmMfN8TZl+h+MSrQ9Wb4gluStv8HUsPn3SQ+gjxStLd3Q4SIQ6wET2X1ArApPMNzso8f bN7g4JhSuDhYUUKsIFIrSoW2kqdWML4CBaEk2G1UBTcbvw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (wael.necoro.dev) smtp.remote-ip=92.60.36.208; dmarc=none header.from=necoro.eu; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1622490137; bh=AFtkmLxui0UuTdcEZOBYWOKoUo++Ie7ang1OO8PYoWE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:DKIM-Signature; b=Gm/Z1iHTxLVPlb32oKaMn330N2MyySQkvG0T18lMwy5leJaYxLHyWQIFeOjj1wnh0sbIxii7rq OqTqXYPfgYbvcV98KUlEk46Ro4KsDqjclxnKT9NW4fhXLsR/cqMqapr3yLBNK80IaWVUwcYGiZ NT5h7vKp18sRpOWuegC03Sa2fp7NIWiMP/CDb2fnj97RyuBkgaseVgYt4D0fAY1M56nPo7z4OB vwGSLd9i3rJQLr/wXGpymLRxzejne91MCmTNf1eMdc/PsBSG/yZeqTsrZAVFGF3xY9raTG2vTY pGDwv0wYhNgPqZHWXfH9wRNUyZmqM3IFPVPVrOE48lEztw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To: Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=OF2i64IoXX1yfhLPl8ntCB9HpqLjSKCZJBJjzpxPKYI=; b=h/KcDjBmN3nSa49lbcJTplSNJB jij2gvm/Rr5lOFhUhFnKux0Wp1t1O8HyFytjtYdpHVJOowI9JjbIu8L0fapRLcI6ETkcekozSbKcf X687K1rcJKHnVay8oHQYtogvrNmAw0nh2I9JP8Uym4J6oVwP3aFEb/EO0tAoLd7RaDs//Hfd/U1Mh +k0OMxiB5Fg+A3NWD5koe9ryio0GpzWlCA5SQosc/f+Zm2b+LvxVgTFmjpdveq3zDMQcx9EKcnmsI vOEEjYdmLngM07OcXfOJ7KeYfJaBEpBIIv+QkkiL02itFOeiF27vr79FK+7qQ9d52n2n081WZYoOW H2SS+fJQ==; Received: from authenticated user by zero.zsh.org with local id 1lnnnj-000OP8-VF; Mon, 31 May 2021 19:42:15 +0000 Authentication-Results: zsh.org; iprev=pass (wael.necoro.dev) smtp.remote-ip=92.60.36.208; dmarc=none header.from=necoro.eu; arc=none Received: from wael.necoro.dev ([92.60.36.208]:37734) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lnnmv-000Neq-B7; Mon, 31 May 2021 19:41:25 +0000 Received: from wael.necoro.dev (localhost [IPv6:::1]) by wael.necoro.dev (Postfix) with ESMTP id 3682EE1F57 for ; Mon, 31 May 2021 21:41:24 +0200 (CEST) Received: from [192.168.0.38] ([31.17.213.74]) by wael.necoro.dev with ESMTPSA id IcJqCuQ7tWBODRUAc/PHBg (envelope-from ) for ; Mon, 31 May 2021 21:41:24 +0200 Subject: Re: [Review Request] Arrays and their usage To: zsh-users@zsh.org References: <26fc6ecd-4a05-e562-7274-ba045df536bf@necoro.eu> From: =?UTF-8?Q?Ren=c3=a9_Neumann?= Message-ID: Date: Mon, 31 May 2021 21:41:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Seq: 26753 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: > I don't know what the exact output of your makepkg pipeline can be, > but unquoted `` will split words on all whitespace, so that is a bit > of a danger. I would probably have written it like this > > local pkgs=( ${(f)"$(makepkg --blabla | sed blabla)"} ) There shouldn't be any spaces in it, but better safe than sorry. Even though the array + (f) + quoting seems a handful, which probably ends up in some head scratching later on. But well... > sudo pacman -S $DATABASE/$^pkgs Oooh... the ${^pkgs} is nice. Haven't known this one. Thanks! - René