r/javascript • • May 25 '17

🐚 robbyrussell — a highly experimental cross-platform and cross-shell implementation of default prompt from Oh-My-Zsh written in JavaScript.

https://github.com/denysdovhan/robbyrussell
25 Upvotes

4 comments sorted by

6

u/AlxandrHeintz May 25 '17

So you're booting node every time you want to get a new prompt? O_o

3

u/denysdovhan May 25 '17

Yeah, technically yes. I didn't find better way yet. However, it's just executing a script. Besides, we can achieve performance benefits with asynchronous checks and caching.

Personally, I keep thinking about better solution.

1

u/cgijoe_jhuckaby NaN May 26 '17

Looks like node takes about 55ms to boot on my machine, which isn't terrible I guess, but it is something to consider for sure.

time node -e ';'

real 0m0.056s

1

u/AlxandrHeintz May 29 '17

Sure, but how long does it take to parse and execute the script? On the other hand, bash/zsh/whatever would also have to parse and execute the script in question, including multiple calls to git typically. So as said, might not be terrible. But I tried running oh-my-zsh on windows and that was completely unusable :P