terminal-kit | Terminal utilities for nodejs | Command Line Interface library
kandi X-RAY | terminal-kit Summary
kandi X-RAY | terminal-kit Summary
A full-blown terminal lib featuring: 256 colors, styles, keys & mouse handling, input field, progress bars, screen buffer (including 32-bit composition and image loading), text buffer, and many more...
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of terminal-kit
terminal-kit Key Features
terminal-kit Examples and Code Snippets
Community Discussions
Trending Discussions on terminal-kit
QUESTION
There are libraries like typewriterjs and typeitjs for producing animated typing effect in the DOM. How can I produce a similar effect in the terminal. The closest option I found is terminal-kit, but it is causing problems for me when the cli app has to take an input just after the effect is completed. The next input is adding unwanted characters, and I cant seem to find a way to solve it (refer the gif below).
This is how I produced that effect using terminal kit. It would be helpful if someone can tell me why the next input is not being registered properly after the effect completes.
...ANSWER
Answered 2020-Aug-13 at 17:19The problem occurs because at that point two calls to takeInput
have been made (the one at the last line and the one from the callback of slowTyping
), that means that two repl servers have been started and they both take input at the same time, that explains the duplication of the input. It will get worse because by the next message three repl servers will be active at the same time and more will be created after each message.
takeInput
should keep track of the repl servers it creates, and should make sure that only one exists at any time. When takeInput
is called, it should destroy any previous input fields and create a new one. I don't know how to cancel a repl server and I don't think you should be using it in the first place since terminal-kit already provides a better alternative: inputField
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install terminal-kit
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page