zsh-users
 help / color / mirror / code / Atom feed
* infinite loop that is possible to quit
@ 2020-12-01  1:50 Emanuel Berg
  2020-12-01  7:36 ` Alex Satrapa
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Emanuel Berg @ 2020-12-01  1:50 UTC (permalink / raw)
  To: zsh-users

How do I do an infinite loop that runs something, but it will
still be possible to quit the whole thing?

The best thing I've come up with is

while true; do
  # run program
  sleep 1
done

Then do, say, q to exit the program, and C-c during the sleep
period to quit the loop!

Is this good or bad?

TIA

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-01 17:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01  1:50 infinite loop that is possible to quit Emanuel Berg
2020-12-01  7:36 ` Alex Satrapa
2020-12-01  9:53 ` Lewis Butler
2020-12-01 17:17 ` Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).