Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
trap stdout and stderr and format without adding to command line?
- X-seq: zsh-users 16118
- From: Trevor Wennblom <trevor@xxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: trap stdout and stderr and format without adding to command line?
- Date: Tue, 28 Jun 2011 21:42:23 -0500
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hello,
I'm attempting to find a way to arbitrarily format stdout and stderr by default.
Essentially:
% ls
[stdout] file00 file03 file06 file09 file12 file15 file18
[stdout] file01 file04 file07 file10 file13 file16 file19
[stdout] file02 file05 file08 file11 file14 file17
%
The closest I've gotten is Jeroen van Wolffelaar's annotate script[1] and trying to wrap it with preexec (where much learning occurred and adventure was had).
I'm guessing I could compile a custom shell to always prefix the command with the annotate script. Alternately could stdout/stderr be modified by the shell itself?
Second question, somewhat related. I noticed the annotate script would treat output differently. For instance; stripping coloring, treating 'ls -C' like 'ls -1', etc.
trevor
[1]: http://jeroen.a-eskwadraat.nl/sw/annotate/annotate
Messages sorted by:
Reverse Date,
Date,
Thread,
Author