From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8697 invoked by alias); 10 Mar 2014 18:56:28 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18580 Received: (qmail 20938 invoked from network); 10 Mar 2014 18:56:11 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Authority-Analysis: v=2.1 cv=HYUtEE08 c=1 sm=1 tr=0 a=C0g08kOJMvqFFjNsah5K5g==:117 a=C0g08kOJMvqFFjNsah5K5g==:17 a=HIA4oEAs-AEA:10 a=8nJEP1OIZ-IA:10 a=5uU_IHmyjxsZq-la1aUA:9 a=wPNLvfGTeEIA:10 Message-id: <531E0393.6060106@eastlink.ca> Date: Mon, 10 Mar 2014 11:25:23 -0700 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20131103 Icedove/17.0.10 MIME-version: 1.0 To: zsh-users@zsh.org Subject: return up two levels? References: <140310083224.ZM10646@torch.brasslantern.com> In-reply-to: Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit Didn't I read somewhere that one can return from a function 'up two levels'? i.e. that if function1 calls function2, that function2 can return both itself and function1? I have a helper function that might want to return to the calling function, or might want to return right back to the shell. Of course I can do this with with return value tests within the calling function, but it would be nice if the helper function could handle it internally. Is it possible? 'exit' kills the shell itself, so it's too aggressive.