Replies: 1 comment 1 reply
-
I suspect this functionality is currently broken because of some enquirer interop workarounds, see e.g. https://github.com/hongaar/bandersnatch/blob/main/src/repl.ts#L28 Can you try to comment out lines 30 and 124 of this file, and see if it makes a difference? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been using bandersnatch to interactively test libraries I'm developing.
I'm finding it would be helpful to have a consistent way in the repl to read and evaluate commands from a file.
This would allow me to easily reuse sequences of commands.
The Node.js repl provides .save and .load but I don't think they work in bandersnatch.
For example if I start my cli, run some commands and then enter .save bar
I'll see a message
Session saved to: bar
but only an empty "bar" file will be created.Similarly if I create a file "foo" containing some commands and run .load foo it looks like
the commands aren't parsed properly. E.g.
Note my cli is suppressing the complete backtrace for the "Unknown arguments" error so you don't see it here.
The commands in this example work fine if entered line at a time. Also curious that the error report includes
commas in between the arguments of the second command.
From this I conclude some part of the Node.js repl is there but not fully integrated in bandersnatch.
It would be nice if the Node.js .save/.load commands worked as they do in Node.js or if similar functionality
was available in another form.
Beta Was this translation helpful? Give feedback.
All reactions