-
Notifications
You must be signed in to change notification settings - Fork 22
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
Allow inim to be started with any -d flags #51
Conversation
6e2e05e
to
c69adb4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please re-submit this PR with a cleaner history, looks like a really good feature - thank you @ryanc-signiq 👍
src/inim.nim
Outdated
let result = readLineFromStdin(getPromptSymbol(), currentExpression) | ||
if not result: | ||
raise newException(EOFError, "Ctrl+D was pressed") | ||
except EOFError: | ||
cleanExit() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there are some unrelated commits in this PR
src/inim.nim
Outdated
|
||
var app: App | ||
|
||
const | ||
INimVersion = "0.4.1" | ||
indentSpaces = " " | ||
indentTriggers = [",", "=", ":", "var", "let", "const", "type", "import", | ||
"object", "enum"] # endsWith | ||
"object", "RootObj", "enum"] # endsWith |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated?
c69adb4
to
e22f13e
Compare
Hey mate, I've removed the unrelated code from the commit. Apologies for the unrelated code ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This now works to my limited understanding of the nim compiler. Without it, there's an unknown short option error, with it, it seems to be happy. Would appreciate some other test cases, but will merge for now!
Master:
λ inim -d ssl -d release
Unknown short option: "d"
Run with --help for full usage.
This PR:
λ ./inim -d ssl -d release
👑 INim 0.4.1
Nim Compiler Version 1.0.6 [Linux: amd64] at /home/oatman/.nimble/bin/nim
nim> echo "test"
test
nim>
nim> exit
λ ./inim # checking no flags still works
👑 INim 0.4.1
Nim Compiler Version 1.0.6 [Linux: amd64] at /home/oatman/.nimble/bin/nim
nim> echo "test"
test
nim> exit
This is now in release 0.4.2 👌 |
Postional arguments at the end of the inim invocation get passed to the compiler
ie inim --nim=~/.nim/mynim -d ssl -d release