realChakrawartiR
Denoβ€’9mo agoβ€’
1 reply
realChakrawarti

Avoid newline at the end of Deno.stdout.(write/writeSync)

Here is my use case:

I have a cli that outputs some command like git clone <url> and I want to print editable string in terminal so that I could replace the <url> with the actual repo url.

const text = new TextEncoder().encode("git clone ");
Deno.stdout.writeSync(text) 

What happens is, it echo git clone in the terminal and ends. I couldn't input anything after that.

How do I do that? I couldn't find anything.
Was this page helpful?