Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: vanishing spaces
- X-seq: zsh-users 29745
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: vanishing spaces
- Date: Sat, 30 Mar 2024 10:16:14 -0700
- Archived-at: <https://zsh.org/users/29745>
- In-reply-to: <Zgg4rXc5osTViiJG@prometheus>
- List-id: <zsh-users.zsh.org>
- References: <3643c571-5830-420c-9d1f-88a6bf22cc0e@eastlink.ca> <Zgg4rXc5osTViiJG@prometheus>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author