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,HTML_MESSAGE, 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 F1E3F22768 for ; Sat, 30 Mar 2024 18:16:51 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1711819011; b=sVxmng4lSI3ZGdz7jN6iLXk0u1fRZMxRWZniWyPOVkJBJgNh8hKckOq5+4qD9V3/nO+Bqd16li +shVY/SPkZNhmboS9oObn4OX1ddfMDXcshjiy+Ci+9CaPIAOuD6Xz3CaImCuwjmmyzrs4UqGXE lcTMkYFurKSlcusY0iNu9hD7IlEm3f3LUTFKVv+CQTWWOetx9oOcrlK9Ut2wdzEJRENL9iOVhx wx1/IYD3r0LqjcChFdU1xgwNy5WNqixDFWaZr6BA2jlxS6SyhRBNLtOeWHXXRiQZqdYyTMLekc XvWgSruK5Ng4ZFaLJOF1JTR6PsnyJhO+U0tQ7dVHJH/Pqg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta01.eastlink.ca) smtp.remote-ip=24.224.136.30; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1711819011; bh=kWKaVuD5Jomrj6n1JO3Onf6Go5PqfAqxfHp4/9LCJeU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Content-Type:DKIM-Signature; b=O8iFckSiP9r2F09gyFfNrlkS9gULcEQIBA5v6FLpJndjTx9RbzRcKTv+Kwl34SsZ05THTA67l6 FbgpwCGtCXlXHUzGDccnyecihfFXwQ6yDlWL7PKIhRj0hH5jcOD8vw1cr6wB5OyPyYoIdedOxY 0t0+Xg3sukE8BsIVMLVGg1/BQH7OneZbsfE49xlkUNOBaImiTFkA6+4fAHQK0GFqWrb02xqv4A HifNbwuUdgFbeokZhdNrWxaCk5WEVU/pj+JJRca9SYGDq2eiTI03TsPqZy4K346lgMNI0ZQz8h Z5RoViXBzs5oL+C4ErfKnpniTvIlGl+oJz3ZLCXdEheypw==; 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:From:References:To: Subject:MIME-version:Date:Message-id:Content-type:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=grEXuXgkqeiv3e2r9NWTJnP3quCptmM44aT70eCay2k=; b=dSdaYbbFejACYU56R2RdPpdYT5 Pe5krPGvlQlgdJSdsBQAy5SgZACfPrhz/MclQoftMNDPAVhJC78+RHipwVyLJIfNjWmJxW5XFKle6 GyEb4hmB93bSBRI+SpdjCoDpv4Z0XBZJRpKy+ns3e5d/WWKJO279Bs+TL1IuGorHWb/7zrkRR0Far SQ/JJL1KU7BvEpbRd+dvDBChE1WEzF2PlU6dCRIxpJ5uPXWoBiRzIBbmNZPDMANS+1Lx5bz41C+77 lhsal7uM3r0AOezxVP5GFND9AHPvNaGiixVP0jE8Z4+XmAZ0G//iCifiM53UZWmkFL1t+/8MNtlM+ +EZPISTA==; Received: by zero.zsh.org with local id 1rqcK3-000GRZ-7l; Sat, 30 Mar 2024 17:16:51 +0000 Authentication-Results: zsh.org; iprev=pass (mta01.eastlink.ca) smtp.remote-ip=24.224.136.30; dmarc=none header.from=eastlink.ca; arc=none Received: from mta01.eastlink.ca ([24.224.136.30]:52673) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rqcJU-000FlP-IZ; Sat, 30 Mar 2024 17:16:16 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta01.eastlink.ca ([24.224.136.30]) with ESMTPS id <0SB623QZ77X2CUO0@mta01.eastlink.ca> for zsh-users@zsh.org; Sat, 30 Mar 2024 14:16:15 -0300 (ADT) Received: from [192.168.0.11] (host-24-207-19-13.public.eastlink.ca [24.207.19.13]) by csp02.eastlink.ca ([71.7.199.167]) with ESMTPSA id qcJSrj37U5TsrqcJTr6Elx (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Sat, 30 Mar 2024 14:16:15 -0300 X-Authority-Analysis: v=2.4 cv=deIj3mXe c=1 sm=1 tr=0 ts=660848df a=e7T7DzMKK1R988ZCg0wLyw==:117 a=e7T7DzMKK1R988ZCg0wLyw==:17 a=r77TgQKjGQsHNAKrUKIA:9 a=R187rbyYxJVxYMboh-AA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=YqoCOoBMFW-oJpqvp0AA:9 a=7Zsu8qD_U8UkKQ_V:21 a=_W_S_7VecoQA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddvhedgjeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurheptgfkffggfgfuvfhfhfgjsegrtderredtvdejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpefhteethfevgeeuvdelgefgvdevudefueduffdvgfelvddvgfdtieegueeuleeifeenucfkphepvdegrddvtdejrdduledrudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrdduledrudefpdhhvghloheplgduledvrdduieekrddtrdduudgnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Content-type: multipart/alternative; boundary="------------8WNJBF0o3QF5EKp00u8acD60" Message-id: Date: Sat, 30 Mar 2024 10:16:14 -0700 MIME-version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: vanishing spaces To: zsh-users@zsh.org References: <3643c571-5830-420c-9d1f-88a6bf22cc0e@eastlink.ca> Content-language: en-US From: Ray Andrews In-reply-to: X-Seq: 29745 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: This is a multi-part message in MIME format. --------------8WNJBF0o3QF5EKp00u8acD60 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-03-30 09:07, Marc Chantreux wrote: > aptitude search '~i~nnvidia' for short. check it out: Works fine, thanks. > good: > > output="$( eval $* )" > echo "$output" I tried to minimalize the issue: % var="$(aptitude search '~i~n(nvidia)')" % print "$var" ...  but I still loose the spaces.  No variation on quoting helps. Tried with: emulate -L zsh ... thinking it might be some option or other, but no change. > Aside: I don't understand why you eval it. it's ok to write In my function I have nested expansions, so the eval seemed necessary. Bart: > That's not an array variable, it's a string. You need output=( $( ... ) ) for array assignment. ... of course, sorry, I pasted an experimental line by accident. > What does print -r -- "$( eval $* )" show? ... no improvement. % print -r -- "$(aptitude search '~i~n(nvidia)')" ... doesn't fix it either. Seems Marc is using Debian (or derivative) so if he gets it showing properly then I must have some local anomaly. Hey ... just occurs to me now ... the aptitude columns are 'smart' -- the wider your terminal the wider the gap between columns! So, as you intuit Bart, maybe the columnizing can't work without a terminal. -- it's a feature specific to a known width of output. ... yeah, that's it. 'aptitude --disable-columns' ... same output. So this never was a zsh issue. I wish we had some way of killing threads, I'd just nuke this thread as a red herring. --------------8WNJBF0o3QF5EKp00u8acD60 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

On 2024-03-30 09:07, Marc Chantreux wrote:
aptitude search '~i~nnvidia' for short. check it out:

Works fine, thanks.
good:

	output="$( eval $* )"
	echo "$output"
I tried to minimalize the issue:

% var="$(aptitude search '~i~n(nvidia)')"
% print "$var"

...  but I still loose the spaces.  No variation on quoting helps.  Tried with:
emulate -L zsh
... thinking it might be some option or other, but no change.

Aside: I don't understand why you eval it. it's ok to write
In my function I have nested expansions, so the eval seemed necessary. 

Bart:

> That's not an array variable, it's a string.  You need
  output=( $( ... ) )
for array assignment.

... of course, sorry, I pasted an experimental line by accident.

> What does

print -r -- "$( eval $* )"

show?

... no improvement.  

% print -r -- "$(aptitude search '~i~n(nvidia)')"

... doesn't fix it either.

Seems Marc is using Debian (or derivative) so if he gets it showing properly then I must have some local anomaly. 

Hey ... just occurs to me now ... the aptitude columns are 'smart' -- the wider your terminal the wider the gap between columns!  So, as you intuit Bart, maybe the columnizing can't work without a terminal. -- it's a feature specific to a known width of output.

... yeah, that's it.  'aptitude --disable-columns' ... same output.  So this never was a zsh issue.  I wish we had some way of killing threads, I'd just nuke this thread as a red herring.






--------------8WNJBF0o3QF5EKp00u8acD60--