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

Unable to restore suspended function



I have a simple function to page output of ls. With Zsh 5.8.1 (and earlier), I could suspend it then restore it with fg. With Zsh 5.9, it enters some odd state where I have to call fg a few times before it exits (FreeBSD). It never restores less. I tested this with FreeBSD and Linux. It works as expected with both FreeBSD's sh and bash.

Test environment (bare bones with no Zsh files in /tmp/zsh):
mkdir /tmp/zsh
env -i ZDOTDIR=/tmp/zsh TERM=${TERM} HOME=${HOME} USER=${USER} zsh
pll() { /bin/ls -lF "${@}" | less; }

Test output (FreeBSD):
% pll /tmp/zsh
total 0
(END)
---- Ctrl+z ----
zsh: done       /bin/ls -lF "${@}" |
zsh: suspended
% fg
[1]  + done       /bin/ls -lF "${@}" |
       continued
zsh: done                    /bin/ls -lF "${@}" |
zsh: suspended (tty output)
zsh: done                    /bin/ls -lF "${@}" |
zsh: suspended (tty output)
% fg
(END)zsh: done                   /bin/ls -lF "${@}" |
zsh: suspended (tty input)
zsh: done                   /bin/ls -lF "${@}" |
zsh: suspended (tty input)
% fg
[1]  + done       /bin/ls -lF "${@}" |
       continued
zsh: done                    /bin/ls -lF "${@}" |
zsh: suspended (tty output)
zsh: done                    /bin/ls -lF "${@}" |
zsh: suspended (tty output)
% fg
[1]  + done       /bin/ls -lF "${@}" |
       continued

Linux is similar but never exits. It just outputs the "tty output" blocks each time fg is called.

Sean
--
sean+dev@xxxxxxxxxx




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