Conversation
|
What's wrong with putting it in dfhack.init? |
|
It's easier to run a command once by putting it on the command line than it is to edit dfhack.init and then start the game and edit dfhack.init again. vim has .vimrc and +foo for the same reason. The other part of #755 is that a plugin would have to define a |
library/Core.cpp
Outdated
There was a problem hiding this comment.
This should check for the global being non-null (and the fields should probably be renamed too).
…nt to running ./dfhack and then typing "echo foo" into the console. uses shell argument splitting, so "./dfhack +somecommand 'foo bar' baz" does the right thing. See DFHack#755.
9bccf45 to
106891f
Compare
|
Ok, so DF does some weird stuff with command line arguments. My new code should handle everything, but the way DF parses However, I don't think there are any dfhack commands that need space-hyphen inside any of their arguments, so this shouldn't be a problem. |
For example,
./dfhack +echo foowould be equivalent to running./dfhackand then typingecho foointo the console. uses shell argument splitting, so./dfhack +somecommand "foo bar" bazdoes the right thing.See #755.