Once CLI is run, you are supposed to see the main prompt, waiting for commands.
Easiest thing to do, is just typing the command completely with all needed parameters, and just typing ENTER.
So far, so good.
However, there are some special keys and commands that make usage of the CLI very straightforward, enabling all the special features provided by CLIck.
As already described, entering a context is performed by running the relevant command, according to the structure defined in the CLI structure XML file.
Three commands are automatically added into every context to get out of the current context:
As per most of the available command-line tools, autocompletion is triggered by the TAB key.
Autocompletion requires you have already typed at least one character, as pressing TAB with nothing in the input buffer won't do anything.
CLIck, supports context/command aware intelligent autocompletion, that means that can complete:
If one or more commands or parameters are matched, all the possible matches are printed-out, so only when one single match is available, text is auto-completed.
By simply typing the ? key, all available commands, together with the relevant brief descriptions, will be printed out.
As for autocompletion, command list is context/command aware as well, that means that typing ? on a line where a command has already been identified, will print out the complete help of the identified command.
So summarizing:
Please note that full command help will also show the command's possible parameters.
History is quite similar to what all the typical shell applications do.
At any time, special command history, automatically added in every context, will show up to the last 256 commands run. This number is statically set to 256 in release 0.1, and decided at runtime for all following releases.
When showing the command, an incremental number is associated with those commands.
It is possible to call again any of those commands, without the need of typing them again, just using the special command !<command_number>.
~~~~~~~~
main> credits
Not much to say:
- Marco Zac (zacmarco@gmail.com)
ENJOY!!!
main> config
config> exit
main> history
1 credits
2 config
3 exit
main> !1
credits
Not much to say:
- Marco Zac (zacmarco@gmail.com)
ENJOY!!!
main>
~~~~~~~