Added CLIgen tab-modes in config option CLICON_CLI_TAB_MODE, which means you can control the behaviour of <tab> in the CLI.
This commit is contained in:
parent
0ef704563b
commit
55f9b7cab0
4 changed files with 22 additions and 1 deletions
|
|
@ -157,6 +157,7 @@
|
|||
|
||||
### Minor changes
|
||||
|
||||
* Added CLIgen tab-modes in config option CLICON_CLI_TAB_MODE, which means you can control the behaviour of `<tab>` in the CLI.
|
||||
* Yang state get improvements
|
||||
* Integrated state and config into same tree on retrieval, not separate trees
|
||||
* Added cli functions `cli_show_config_state()` and `cli_show_auto_state()` for showing combined config and state info.
|
||||
|
|
|
|||
|
|
@ -541,6 +541,9 @@ main(int argc, char **argv)
|
|||
if (cligen_tree_find(cli_cligen(h), cli_syntax_mode(h)) == NULL)
|
||||
clicon_log(LOG_WARNING, "No such cli mode: %s (Specify cli mode with CLICON_CLI_MODE in config file or -m <mode> on command line", cli_syntax_mode(h));
|
||||
|
||||
/* CLIgen tab mode, ie how <tab>s behave */
|
||||
cligen_tabmode_set(cli_cligen(h), clicon_cli_tab_mode(h));
|
||||
|
||||
if (logclisyntax)
|
||||
cli_logsyntax_set(h, logclisyntax);
|
||||
|
||||
|
|
|
|||
|
|
@ -155,6 +155,9 @@ static inline char *clicon_clispec_dir(clicon_handle h){
|
|||
static inline char *clicon_cli_mode(clicon_handle h){
|
||||
return clicon_option_str(h, "CLICON_CLI_MODE");
|
||||
}
|
||||
static inline int clicon_cli_tab_mode(clicon_handle h){
|
||||
return clicon_option_int(h, "CLICON_CLI_TAB_MODE");
|
||||
}
|
||||
static inline char *clicon_cli_model_treename(clicon_handle h){
|
||||
return clicon_option_str(h, "CLICON_CLI_MODEL_TREENAME");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ module clixon-config {
|
|||
type string;
|
||||
default "datamodel";
|
||||
description
|
||||
"If CLICON_CLI_GENMODEL is set, CLI specs can reference the
|
||||
"If set, CLI specs can reference the
|
||||
model syntax using this reference.
|
||||
Example: set @datamodel, cli_set();";
|
||||
}
|
||||
|
|
@ -346,6 +346,20 @@ module clixon-config {
|
|||
Set to 1 if you want CLI to scroll sideways when approaching
|
||||
right margin";
|
||||
}
|
||||
leaf CLICON_CLI_TAB_MODE {
|
||||
type int8;
|
||||
default 0;
|
||||
description
|
||||
"Set CLI tab mode. This is actually a bitfield of three
|
||||
combinations:
|
||||
bit 1: 0: <tab> shows short info of available commands
|
||||
1: <tab> has same output as <?>, ie line per command
|
||||
bit 2: 0: On <tab>, select a command over a <var> if both exist
|
||||
1: Commands and vars have same preference.
|
||||
bit 3: 0: On <tab>, never complete more than one level per <tab>
|
||||
1: Complete all levels at once if possible.
|
||||
";
|
||||
}
|
||||
leaf CLICON_CLI_UTF8 {
|
||||
type int8;
|
||||
default 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue