Skip to content
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

Merged
merged 1 commit into from
Apr 6, 2020

Conversation

ryanc-signiq
Copy link
Contributor

Postional arguments at the end of the inim invocation get passed to the compiler

ie inim --nim=~/.nim/mynim -d ssl -d release

Copy link
Collaborator

@0atman 0atman left a 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
Comment on lines 244 to 248
let result = readLineFromStdin(getPromptSymbol(), currentExpression)
if not result:
raise newException(EOFError, "Ctrl+D was pressed")
except EOFError:
cleanExit()
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated?

@Tangdongle
Copy link
Collaborator

Hey mate, I've removed the unrelated code from the commit. Apologies for the unrelated code ;)

@0atman 0atman self-requested a review April 6, 2020 08:17
Copy link
Collaborator

@0atman 0atman left a 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

@0atman 0atman merged commit ed03792 into inim-repl:master Apr 6, 2020
0atman added a commit that referenced this pull request Apr 6, 2020
 - Allow inim to be started with any -d flags
 - Inputting a variable tries to print it's value
@0atman
Copy link
Collaborator

0atman commented Apr 6, 2020

This is now in release 0.4.2 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants