Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: What would you say is the most-used way of indenting case labels
- X-seq: zsh-users 10589
- From: Phil Pennock <phil.pennock@xxxxxxxxxxx>
- To: Zsh Users' List <zsh-users@xxxxxxxxxx>
- Subject: Re: What would you say is the most-used way of indenting case labels
- Date: Fri, 11 Aug 2006 16:22:25 +0200
- In-reply-to: <dbfc82860608110354g5daf7b95hf23f86fc8f744ecb@xxxxxxxxxxxxxx>
- Mail-followup-to: Zsh Users' List <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <dbfc82860608110354g5daf7b95hf23f86fc8f744ecb@xxxxxxxxxxxxxx>
- Sender: Phil Pennock <phil@xxxxxxxxxxxxx>
On 2006-08-11 at 12:54 +0200, Nikolai Weibull wrote:
> I'm trying to set a default for a shell-script indentation script.
Or, if you want to be puzzled, shove a function into zsh and look at
what "zsh -f" produces. Valid, there's logic to it, but it doesn't
match the writing style of anyone I know. ;^)
% function foo { case $1 in (a) print alpha; print second; print third;;
(b) print beta;; (*) print omega;;esac }
% whence -f foo
foo () {
case $1 in
(a) print alpha
print second
print third ;;
(b) print beta ;;
(*) print omega ;;
esac
}
The same output comes if you spread things out more when entering it.
So the first line of the action is always shown inline with the
conditional value and the subsequent lines are indented further.
--
VISTA: Viruses, Infections, Spyware, Trojans & Adware
Messages sorted by:
Reverse Date,
Date,
Thread,
Author