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.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 CA11420CCA for ; Sat, 30 Mar 2024 17:12:00 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1711815120; b=hDkIQv/h7RshDFEcopqVBsd8Y45y6OlLXTK3RCvNl6CALyBFQKES9i7yBOtA9Dgtmsg8My/mAA JkHlUrQ8Of81zJFxnb196ZkQJi7gmcwOoXQYpqNuydsyTvdlMUZoL6QEWNHNG6gA9A/+zOpIaT fOGNjTNei09Zw8qrt/JVr4zYOhYRtdxBqQrTuroebj9SwdsiJ9qLPkFxSuXv8fKK+cUanFxB2P 6urbUne8zTIulur+LfQKCGjxyJVuAs60BZ6ApUt2fU3ONl7TFc7zLIe6O3168BBeVFip3xhMBo sPYrg3fygRbtfBac48vdTEKDchwW1woA9sQUxAg3hcB9vA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f41.google.com) smtp.remote-ip=209.85.218.41; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1711815120; bh=pPN1paFRXLDea+EmKN327dEBj0H40R7gdrAOmSkjMyE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=XuQvHjhZEs4ts4fLeTL3WJUVYg0Nfsur7jknGs1KqyVkPEqIhN2opWel/yZ5/kmjtiKKvcEFyW nRSk0i+iVpRzpTMn68PvF5A28BqK9bJt9iUsEQt7HF8RhExUeBhTGi0mK7j3G4jwtZbFFAkQZj oLnnmBpEAvu2UXxnWOX26GK65IV6CRw8AxT8FyIoOGcSC8NQrnBVuVSqvYvr/al4I07ph0c1zN hDscnRKw0BQEfStpByKFvnNOSnJUkd0SQMnnJrXxGBO0GaI3XzXA2aYmXKNFUdGQatmit1avt8 +J7cMR4H7SpT1o2kOKevOycuN1bA77ORDMqGMFSD/CS8rw==; 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:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=HQyxrBQ2yjG0MdmOg5Neg7cB9NXa+0SxrcsiARDogUM=; b=nMSicI2VoVHgtS1LGMwiaHKxs5 5KuD7Sit7QXGAbS0vyrJy+WQ1lO+KLPr6CRAfi5ABpAXs48JGZJpTgzlUipKdH+/cfvJqHJ7CT5TE 5zXYWNzQE7+kdN5UWBCsQ6zOGsZRbU1Q434f8gTZsggvhAQdHL8wyJeyc/4301WJ7EdYMGFzuaemR 8aAlUSkZaOSUOf1udvcJqwkI2zReNd1dKNTLuE01jyp9HSlQqVPZQSqARLWILOC7DsZzICfMOYNiA V3Lsz/hgCf9CGogVry3aLm+eg4EwQYlkv2nD5KMem2OTPJQcH5NTuj2KFhB5nKqm+xKu7mp5Tn/K/ PI53L2kw==; Received: by zero.zsh.org with local id 1rqbJI-000DIC-Hv; Sat, 30 Mar 2024 16:12:00 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f41.google.com) smtp.remote-ip=209.85.218.41; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f41.google.com ([209.85.218.41]:51318) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rqbEe-000BMa-3t; Sat, 30 Mar 2024 16:07:14 +0000 Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a46f0da1b4fso351974366b.2 for ; Sat, 30 Mar 2024 09:07:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1711814831; x=1712419631; darn=zsh.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HQyxrBQ2yjG0MdmOg5Neg7cB9NXa+0SxrcsiARDogUM=; b=r5o/YZ73IZ4CEz2VQtKyFrFFDjiuXPsQWMy0kJNP9nYRJ8pe8tZhs01x3A1LFgvH7Y ikfDepF8mWLFvDhZlKitNoGuhNlLRaYCXPGdTf6M7acgOlooKGUDNwr9WKVWWAWOSKyY YD2oLkFDbgbz4JbkeI8mpV3Vtd0c0WP7lDr4vzXoQ30tLzs71AqUKK43aja+nnbsTcd4 RC6OrazAfl4a6ykJVrZon6ao4Krp6VPUXtdvnqLrCqPDLwQQUhVWrOwLYHys7PxRExuW ViKgHmBalyvUEkA6iR6SKJTroZUEkFA0ga0YmAlNiktMIwM2AWGRyAHUoFnm56n+523F TcNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711814831; x=1712419631; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HQyxrBQ2yjG0MdmOg5Neg7cB9NXa+0SxrcsiARDogUM=; b=KpH6HxokMHYACC2LUsgyLbl8zvJDHmDOXq8D6/XDh8Ny32BZQ8HzWgnO8hskCy7AYA F8NbsY/Rvc4kYxyicqTAlaFNlXJyDhsPkSrTbpHAVczKy0mrPBPh6UPUX8ur4SImaHFP n2YJLaQhammgkiZdXBMgsGyI4zherh9ualXc6JT1VOUG/XHEq/Jyxu9pGTckvYjK0e3I JKtxxWxLxn6iAQAxHHNmtxgBvS7OBxT7IWfoDlOGMR7DyoRrOX5/m6EVGrweknR39KW6 L3KLjSXxpnzdZedaQmdwDzQ9HLzAJ4EQYhAGaAbS1r5OUMV0IRFNCUKh29ssZT0lJjCq G2NA== X-Gm-Message-State: AOJu0YwoV3jF68c+ib1fnf9VC0H0rTsNwGFwR0vjRyii/cPJJSu3+NsM 5kczoGkrbWzD95IRNXrKAbMQqNepuvHp3pLSZ4AVrFpYzsiQiwRUn+DGQVyxG+zC9RPQE4nAJyF oRxKaHUmiQdbr2nYI8ySAMrBTQMpzNL5YDBS4wRmj9t1HmGyIxBxX X-Google-Smtp-Source: AGHT+IFqaoARzMINz3jdqjK6lbcktpU+9xUZ8C9yjh6lkxxiLzugQD53F8abfWk92bLTe5SMobVI9JmvMbeFKfesLHw= X-Received: by 2002:a17:906:3711:b0:a3e:da6:85f8 with SMTP id d17-20020a170906371100b00a3e0da685f8mr3254475ejc.30.1711814831599; Sat, 30 Mar 2024 09:07:11 -0700 (PDT) MIME-Version: 1.0 References: <3643c571-5830-420c-9d1f-88a6bf22cc0e@eastlink.ca> In-Reply-To: <3643c571-5830-420c-9d1f-88a6bf22cc0e@eastlink.ca> From: Bart Schaefer Date: Sat, 30 Mar 2024 09:07:00 -0700 Message-ID: Subject: Re: vanishing spaces To: Zsh Users Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 29744 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 Sat, Mar 30, 2024 at 8:18=E2=80=AFAM Ray Andrews wrote: > > aptitude columnizes its output [...] > ... I have reason to capture the output of several versions of > aptitude searches into a variable. I hope 'eval' is the right way: > > output=3D$( eval $* ) # Save output to an array variable. That's not an array variable, it's a string. You need output=3D( $( ... ) ) for array assignment. However, simple array assignment is not what you want there, or you'll end up with every word of the output in its own element. You might not need the "eval" there, because $( ... ) is already a command substitution; you only need the "eval" if there are elements of $* that you want further expanded. It may work to use just $( "$@" ) > print -l $output > i A glx-alternative-nvidia - allows the selection of NVIDIA as GLX provid= er [etc] > ... the nice columns disappear. It would appear from "print -l" that you're trying to get each line of the output into a separate array element. Is that correct? I'm not sure from what you've shown us why you're losing the internal spacing, unless perhaps aptitude is doing it because it's output is not a terminal. What does print -r -- "$( eval $* )" show?