Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • pkill -INT less from another terminal? Commented Mar 6, 2018 at 10:09
  • Thanks @muru, pkill -INT less kind of works (only kills less, but not docker-compose), but doesn't really answer the question. Preferably I want to be able to hit Ctrl-C directly in the terminal out of convinience (and I also want to understand how this works...) Commented Mar 6, 2018 at 10:50
  • Have you tried (trap '' INT && docker-compose up --build) | less +F -R? Commented Mar 6, 2018 at 11:43
  • Note that your script will also get the SIGINT Commented Mar 6, 2018 at 11:44
  • @StéphaneChazelas: Thanks. Still pressing CTRL-C will stop docker-compose, while it should only stop the paging mode of less. Can you explain why (docker-compose up --build | less +F -r) is not interruptable in zsh and but is in bash? Commented Mar 6, 2018 at 12:31