Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: SUGGESTION: kill -l could show numbers, too
- X-seq: zsh-workers 20563
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: SUGGESTION: kill -l could show numbers, too
- Date: Thu, 18 Nov 2004 08:33:04 -0800 (PST)
- In-reply-to: <20310.1100793917@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20041118145208.GD13232@xxxxxxxx> <20310.1100793917@xxxxxxx>
- Reply-to: zsh-workers@xxxxxxxxxx
On Thu, 18 Nov 2004, Peter Stephenson wrote:
> kill-l() {
> for i in {1..$#signals}; do
> print $((i-1))\) SIG$signals[$i]
> done | pr -t5
> }
Which can be rewritten as a wrapper, and without the pipe to "pr":
kill() {
case $1 in
(-l)
integer i=0
print -c ${(e)signals//*/\$((i++))\) SIG\$signals[\$i]}
;;
(*)
command kill "$@"
;;
esac
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author