Sample Header Ad - 728x90

Cannot fg a zsh function including less

5 votes
1 answer
292 views
I have this zsh function:
f() {
/usr/bin/find . -type f | less
}
When I run this function, suspend with Ctrl+z, and then run fg, it displays zsh: suspended (tty output) /usr/bin/find . -type f | and I can't resume. Why is that? How can I resume?
arch% f
zsh: suspended /usr/bin/find . -type f |
arch% fg
 - continued /usr/bin/find . -type f |
zsh: suspended (tty output) /usr/bin/find . -type f |
zsh: suspended (tty output) /usr/bin/find . -type f |
arch%
If I run /usr/bin/find . -type f | less directly from the command line without making it a function, it will suspend and resume normally.
Asked by aosho235 (227 rep)
Dec 19, 2024, 03:43 AM
Last activity: Dec 20, 2024, 09:17 AM