help / color / mirror / Atom feed
* 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


This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-users zsh-users/ http://inbox.vuxu.org/zsh-users \
	public-inbox-index zsh-users

Example config snippet for mirrors.
Newsgroup available over NNTP:

code repositories for the project(s) associated with this inbox:


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git