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)
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.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?