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 10587
- From: "Nikolai Weibull" <now@xxxxxxxx>
- To: "Peter Stephenson" <pws@xxxxxxx>
- Subject: Re: What would you say is the most-used way of indenting case labels
- Date: Fri, 11 Aug 2006 14:47:37 +0200
- Cc: "Zsh Users' List" <zsh-users@xxxxxxxxxx>
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=W/bLISh19aIQr6ft7rFnZ18kLMwKEe5D6EUXuTQVf9ggN3OBjNigjpfZyy1xSi29q+ZnNN6T21cInvVrQMP2M9uun+OfsotPA7E5JiftEpY8RJpY/HzU2YAss97vkl9oziqLY8MhWNN304hIKEJWsWOnW1o5WdsbvkAet5+7V5Q=
- In-reply-to: <200608111110.k7BBAuwM017362@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <dbfc82860608110354g5daf7b95hf23f86fc8f744ecb@xxxxxxxxxxxxxx> <200608111110.k7BBAuwM017362@xxxxxxxxxxxxxx>
- Sender: nikolai.weibull@xxxxxxxxx
On 8/11/06, Peter Stephenson <pws@xxxxxxx> wrote:
"Nikolai Weibull" wrote:
> That is, is this style:
>
> case something in
> (*ome*)
> ... ;;
> esac
>
> more common than
>
> case something in
> (*ome*)
> ... ;;
> esac
I use Emacs sh-script mode and I end up with things looking like this
case foo in
(bar)
do_foo_bar
;;
(rod)
do_foo_rod
;;
esac
which is pretty much your second option, except there's no additional
indentation after the test and the separate ;; serves
as a visual end marker (like a "break" in C)
Hm, actually, my examples were a bit flawed. It should have been:
case something in
(*ome*)
...
;;
esac
But it seems that that kind of indenting is oncommon. Argh, so many
choices, so little to gain.
The only consensus seems to be the "(bar)" test is indented from the
"case".
Actually, I found quite a few cases where "(bar)" wasn't indented from
the "case", so that's why I asked.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author