-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inim -i -s=file
to enter interactive inim session instead of exiting upon completion
#33
Comments
inim -i -s=file
to enter interactive inim sessioninim -i -s=file
to enter interactive inim session instead of exiting upon completion
Pushed a fix to master, now it won't exit in case of failure when pre-loading a source code, it displays its errors/output if any (buffers as valid code if no errors) and opens the shell. I would prefer not to introduce a new argument Also, I'm thinking of allowing optional positional argument to do the same as |
I still think we should, but I'm happy to do a PR for it. Same rationale as ipython's use of
bashvar=$(inim -s:scripts/coolfun.nim)
That being said, we could make the default to be true if you prefer (these syntaxes are all now supported now that c-blake/cligen#16 was closed)
Note, the following workaround
bugs/inim/t02_stdin_vs_s.nim: asdf
asdf |
problem of positional arguments is if we later find need for other positional arguments, it'd lead to ambiguity; so maybe let's defer this until later? (as a workaround, an alias / bash function could be used in the meantime) |
I reckon -s works as it should, it loads a source file into the buffer. Users have the option to pipe files into INim and have the piped script run and exit without jumping into a shell. I'm not sold that we need to add it, but I do have an idea or two. I almost guarantee it's faster to run nim -r on the script file you want to just run. Should be go forth with this, we could add another INim flag like -r, --runNow or -f, --runFast to use exclusive of the -s. It accepts the same argument, ie a path to a source file, but it just runs it and exits instead. I'm not keen on reversing the current behaviour for -s and I don't think adding another flag that goes with -s (one to tell INim to just run and exit) is cool. Open to suggestions and for counter arguments to convince me that we still need this 🚀 |
ipython3 --help:
as ipython, inim should not exit inim shell upon completion of the script
file
, regardless of success/failure.ipy
point is interesting, we could have a .inim with same intent; would be useful eg for testing inim; that point is low priority thoughThe text was updated successfully, but these errors were encountered: