Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
terminal width
- X-seq: zsh-users 30475
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: terminal width
- Date: Thu, 2 Apr 2026 10:25:49 -0700
- Archived-at: <https://zsh.org/users/30475>
- List-id: <zsh-users.zsh.org>
If I have a ragged array that I want to cut
down to terminal width this is fine for each line:
output[line_number]=$input[1, $COLUMNS]
... if there are no color codes or tabs. If there are, the
predictable thing happens. Using 'cut' has exactly the same
problem. I doubt the shell can be asked to deal with that, but
I'll ask anyway. Could be that ncurses, or something, will handle
it. Or maybe somebody knows of a utility that can. I understand
that it's a can of worms tho.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author