Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Previous job and Zsh function
- X-seq: zsh-users 26622
- From: Rene Kita <mail@xxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Previous job and Zsh function
- Date: Mon, 5 Apr 2021 12:04:52 +0200
- Archived-at: <https://zsh.org/users/26622>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2021-04/YGrgxIdDyGxKF2wi%40t480>
- List-id: <zsh-users.zsh.org>
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?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author