* Previous job and Zsh function
@ 2021-04-05 10:04 Rene Kita
0 siblings, 0 replies; only message in thread
From: Rene Kita @ 2021-04-05 10:04 UTC (permalink / raw)
To: zsh-users
Basically I have 2 programs, one started directly, one started from
within a function. I switch between these programs with 'CTRL-Z' and
'%-'. When putting the program which is started from the function to the
background, '%-' will put this program to the foreground again. I then
have to choose the other job by number.
Here is an example:
% zsh -d -f
% function func(){ man zsh; }
% man sh # press CTRL-Z
zsh: suspended man sh
% func # press CTRL-Z
zsh: suspended
% jobs
[1] - suspended man sh
[2] + suspended
% %-
[1] - continued man sh
# press CTRL-Z
zsh: suspended man sh
% jobs
[1] + suspended man sh
[2] - suspended # Previous job is function
% %-
[2] - continued
# press CTRL-Z
zsh: suspended
zsh: suspended # Why a second time?
% jobs
[1] + suspended man sh
[2] - suspended # Previous job is function
% zsh --version
% zsh 5.8 (x86_64-ubuntu-linux-gnu)
%
I'm not sure if this is a bug or if I lack understanding. Am I doing
something wrong? Is this working as indented?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-05 10:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05 10:04 Previous job and Zsh function Rene Kita
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).