Discrepancy between help output and performed actions
Closed this issue · 3 comments
If you run rusti with --help
option, it will tell you about:
-
Two options with arguments, which it executes and exits.
-c COMMAND Execute a rusti command and exit -e PROGRAM Execute a one-line program and exit
-
Interactive mode option, which executes file and starts REPL.
-i, --interactive Run rusti interactively even with a file
Now, if you use -i
with -c
or -e
, rusti will not exit, but starts REPL too.
So, the problem is one of:
- misleading help for
-c
and-e
(should omitexit
or tell about-i
) - incomplete help for
-i
(should also tell about-c
and-e
) - wrong actions when
-i
used simultaneously with-c
or-e
(we should actually exit after executing arguments)
It should be pretty trivial to solve this issue after we choose correct action.
Yes, I agree that there is an absence of information in the help text for what -i -e '...'
should do. I don't see any reason that -i
shouldn't function when either -c
or -e
is present, so I'll go ahead and update the help text for -i
to include this.
@murarth thanks!
As a side note, can you look at JIghtuse@993739b ? I tried to add :edit
command and it kinda works. It is almost useless for now, because rusti can't "reload" source file. Do you think it would be useful?
Without the ability to reload files, I don't see the motivation of having an edit command. But it will be something to revisit when more code manipulation features are sorted out.