zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: return up two levels?
Date: Mon, 10 Mar 2014 11:25:23 -0700	[thread overview]
Message-ID: <531E0393.6060106@eastlink.ca> (raw)
In-Reply-To: <lfksrv$vgj$1@ger.gmane.org>

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.


  reply	other threads:[~2014-03-10 18:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-10 11:51 zdotdir Yuri D'Elia
2014-03-10 12:01 ` zdotdir Aaron Kaufman
2014-03-10 13:03   ` zdotdir Yuri D'Elia
2014-03-10 15:32 ` zdotdir Bart Schaefer
2014-03-10 17:28   ` zdotdir Yuri D'Elia
2014-03-10 18:25     ` Ray Andrews [this message]
2014-03-10 19:42       ` return up two levels? Peter Stephenson
2014-03-11  3:00         ` Ray Andrews
2014-03-11  3:33           ` Kurtis Rader
2014-03-11 14:54             ` Ray Andrews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=531E0393.6060106@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).