Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Suspending an interactive job: Zsh vs Bash differences



In the last episode (Jan 11), Robert McLay said:
> I am a recent convert from bash to zsh and am very happy with just
> about every thing in zsh.  There is a difference in Zsh that I miss
> from my bash days.
> 
> It is in suspending a job.  Under bash (currently: version
> 3.2.25(1)-release) when I suspend an interactive program I get:
> 
>     bash$ emacs            # typed ^Z
> 
>     [1]+  Stopped                 emacs
> 
> Under Zsh I get:
> 
>     zsh% emacs               # typed ^Z
>    
>     zsh: suspended  emacs
> 
> So namely I'm missing the job number.  It is correctly reported by jobs:
> 
>     zsh% jobs
>     [1]  + suspended  emacs

Try setting the longlistjobs option, which gives you the job number
plus the pid as a bonus:

dan% sleep 10
^Z
zsh: suspended  sleep 10
dan% kill %1
[1]  + terminated  sleep 10
dan% setopt longlistjobs
dan% sleep 10
^Z
[1]  + 49470 suspended  sleep 10

-- 
	Dan Nelson
	dnelson@xxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author