To install a package, we usually open the REPL and press
] to enter the package mode.
Today I suddenly notice that I can’t find an easy way to imitate this behavior. Because with functions like
readline, users need to explicitly press
Enter. But when we entering the package mode, the prefix changed from
I tried to answer this question by reading the source code of
REPL but no luck. Things are very complicated there to me. I would appreciate it very much if anyone can point out how is everything working in the background.