From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9246 invoked from network); 11 Aug 2006 14:22:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Aug 2006 14:22:41 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 71739 invoked from network); 11 Aug 2006 14:22:33 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Aug 2006 14:22:33 -0000 Received: (qmail 14064 invoked by alias); 11 Aug 2006 14:22:27 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10589 Received: (qmail 14055 invoked from network); 11 Aug 2006 14:22:26 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Aug 2006 14:22:26 -0000 Received: (qmail 70607 invoked from network); 11 Aug 2006 14:22:26 -0000 Received: from parhelion.firedrake.org (193.201.200.77) by a.mx.sunsite.dk with SMTP; 11 Aug 2006 14:22:25 -0000 Received: from phil by parhelion.firedrake.org with local (Exim 4.50 #1 (Debian)) id 1GBXu5-00042i-8v for ; Fri, 11 Aug 2006 15:22:25 +0100 Date: Fri, 11 Aug 2006 16:22:25 +0200 From: Phil Pennock To: Zsh Users' List Subject: Re: What would you say is the most-used way of indenting case labels Message-ID: <20060811142225.GA15429@parhelion.globnix.org> Mail-Followup-To: Zsh Users' List References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Phil Pennock 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