DenoDDeno
Powered by
realChakrawartiR
Denoβ€’11mo 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>
git clone <url>
and I want to print editable string in terminal so that I could replace the
<url>
<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 
git clone 
in the terminal and ends. I couldn't input anything after that.

How do I do that? I couldn't find anything.
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

deno command stdin, stdout continous reading
TangJieHaoTTangJieHao / help
3y ago
Deno write large file
AsafAAsaf / help
2y ago
Deno deploy --allow-write permission.
PonchoPPoncho / help
3y ago