zsh-workers
 help / color / mirror / code / Atom feed
* How to restore $? AND $_ ?
@ 2019-07-24  6:20 Sebastian Gniazdowski
  2019-07-24  6:29 ` Sebastian Gniazdowski
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Gniazdowski @ 2019-07-24  6:20 UTC (permalink / raw)
  To: Zsh hackers list

Hello,
consider the following:

sched-fun() {
    # UND=$_
    local ret=$?

    sched +1 "sched-fun \$_"

    # : $UND
    return $ret
}

The point is that the 2 commented lines must be run in the same place
as the next lines after them in order to work. No way out of this
problem? It is about not disrupting user session with background
tasks, I think that this is in general important.
-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-24  6:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24  6:20 How to restore $? AND $_ ? Sebastian Gniazdowski
2019-07-24  6:29 ` Sebastian Gniazdowski

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).