Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
How to restore $? AND $_ ?
- X-seq: zsh-workers 44570
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: How to restore $? AND $_ ?
- Date: Wed, 24 Jul 2019 08:20:22 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=aKMT/NyZSEpZyNdqscIoDP1JMx/xSa4ckxQZHRxgOeI=; b=tbiuDfXC46+uUtUaUHuBAPhofZz8SO6UyJhKjb8NjGHzZqVbBcpWShXFCMODVhvHLO P/jKMoqUb+nv3FYjMLLES4ejlyJ2c1xqh+hKI2+J8Ldvp++TYMcEMzE0dB9eQxIOfVPu 5tclykLFtlK4EgqAT6ooC1yUhVGX8z8vDxZ/uTNWwmoFLP4CodBsXOY7gsacGFTrNbOZ VnoVvBU7kb1ZX3+LkZZ/ErxNOnDyrGfqJOXHwYIKoBIzAOBo+OCj1boa6iZIHqgQaEWr qjlHG+vX5zj5Uk1BxL9zbt1/IEewVuB9eXgURGk6HSmjcLLOIVoj+LRydQxFupGT6OdQ kNRw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author