zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: vanishing spaces
Date: Sat, 30 Mar 2024 10:16:14 -0700	[thread overview]
Message-ID: <b4ea8e72-f39b-411e-8e59-6911f34abfd4@eastlink.ca> (raw)
In-Reply-To: <Zgg4rXc5osTViiJG@prometheus>

[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]



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.






[-- Attachment #2: Type: text/html, Size: 2242 bytes --]

      reply	other threads:[~2024-03-30 17:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-30 15:18 Ray Andrews
2024-03-30 16:07 ` Bart Schaefer
2024-03-30 16:07 ` Marc Chantreux
2024-03-30 17:16   ` Ray Andrews [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4ea8e72-f39b-411e-8e59-6911f34abfd4@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).