mdBook icon indicating copy to clipboard operation
mdBook copied to clipboard

`mdbook watch` hijacks the terminal

Open amab8901 opened this issue 2 years ago • 5 comments

When I run mdbook build --open, then it lets me browse the documentation without having to keep the terminal busy/occupied. Just browse the docs and keep doing other stuff in the terminal.

But when I run mdbook watch --open, then the terminal becomes unavailable while the docs are open. If I run ctrl+C in the terminal, it will automatically close the documentation.

Please modify mdbook watch so that it can serve the documents without hijacking the terminal.

amab8901 avatar Dec 29 '22 07:12 amab8901

Hi there.

Please modify mdbook watch so that it can serve the documents without hijacking the terminal.

How should this work and what should mdbook watch do differently than mdbook build?

mgeisler avatar Feb 16 '23 12:02 mgeisler

How should this work and what should mdbook watch do differently than mdbook build?

It was a while ago, but let's imagine this scenario: you have built a book. You just want to read it without having to recompile it redundantly. mdbook build and mdbook watch will both rebuild what has already been built, if I remember correctly. I can't promise that I remember all the details correctly since it was some time ago.

amab8901 avatar Feb 16 '23 16:02 amab8901

I think it was mostly a minor issue. I don't remember all the details and it was a while ago. Let's close it for now. If someone else encounters this issue, then can file an issue report and PR and whatnot.

amab8901 avatar Feb 16 '23 16:02 amab8901

mdbook build and mdbook watch will both rebuild what has already been built, if I remember correctly. I can't promise that I remember all the details correctly since it was some time ago.

You do remember correctly :smile: I'm just a user of mdbook and in my experience, it only takes a few seconds to rebuild the book.

mgeisler avatar Feb 19 '23 08:02 mgeisler

You do remember correctly smile I'm just a user of mdbook and in my experience, it only takes a few seconds to rebuild the book.

ok let's fix that issue then (i.e. someone else other than me :smile: )

amab8901 avatar Feb 19 '23 08:02 amab8901