`-q` conflicts with `--quiet` from toolcontext.
Moreover, the documentation talks about commands, not queries,
so this unify the vocabulary.
Signed-off-by: Jean Privat <jean@pryen.org>
-### `-q`, `--query`
-Nitx query to perform.
+### `-c`, `--command`
+Nitx command to perform.
-Execute a query, display results in the console, then quit.
+Execute a command, display results in the console, then quit.
### `--no-attributes`
Ignore the attributes.
### `--no-attributes`
Ignore the attributes.
var docx: Phase = new NitxPhase(self, null)
# Used to shortcut the prompt and display directly the result in console.
var docx: Phase = new NitxPhase(self, null)
# Used to shortcut the prompt and display directly the result in console.
- var opt_query = new OptionString("Nitx query to perform", "-q", "--query")
+ var opt_command = new OptionString("Nitx command to perform", "-c", "--command")
- init do option_context.add_option opt_query
+ init do option_context.add_option opt_command
end
# Nitx phase explores the model and prepares the console rendering.
end
# Nitx phase explores the model and prepares the console rendering.
# start nitx
var nitx = new Nitx(toolcontext, doc)
# start nitx
var nitx = new Nitx(toolcontext, doc)
- var q = toolcontext.opt_query.value
+ var q = toolcontext.opt_command.value
if q != null then # shortcut prompt
print ""
nitx.do_query(q)
if q != null then # shortcut prompt
print ""
nitx.do_query(q)
-base_simple3.nit -q A
-base_simple3.nit -q foo
-base_simple3.nit -q base_simple3
+base_simple3.nit -c A
+base_simple3.nit -c foo
+base_simple3.nit -c base_simple3