prompt command starts
gnmic in an interactive prompt mode with the following auto-completion features:
gnmiccommands names and their flags are suggested.
- Values for the flags that rely on YANG-defined data (like
--model,...) will be dynamically suggested, we call this feature YANG-completions.
The auto-completions are generated from the YANG modules d with the
- Flags with the fixed set of values (
--encoding, ...) will get their values suggested.
- Flags that require a file path value will auto-suggest the available files as the user types.
gnmic [global-flags] prompt [local-flags]
A path to a YANG file or a directory with YANG files which
gnmic will use to generate auto-completion for YANG-defined data (paths, models).
--file flags can be supplied.
A path to a directory which
gnmic would recursively traverse in search for the additional YANG files which may be required by YANG files specified with
--file to build the YANG tree.
Can also point to a single YANG file instead of a directory.
--dir flags can be supplied.
When set, the description of the path elements in the suggestion box will contain module's prefix.
When set, the description of the path elements in the suggestion box will contain element's type information.
--exclude flag specifies the YANG module names to be excluded from the path generation when YANG modules names are clashed.
--exclude flags can be supplied.
--max-suggestions flag sets the number of lines that the suggestion box will display without scrolling.
Defaults to 10. Note, the terminal height might limit the number of lines in the suggestions box.
gnmic prompt suggest both global and local flags for a sub-command.
The default behavior (when this flag is not set) is to suggest only local flags for any typed sub-command.
--suggest-with-origin flag prepends the suggested path with the module name to which this path belongs.
The path becomes rendered as
<module_name>:/<suggested-container>. The module name will be used as the origin of the gNMI path.
--suggestions-bg-color flag sets the background color of the left part of the suggestion box.
Defaults to dark blue.
--description-bg-color flag sets the background color of the right part of the suggestion box.
Defaults to dark gray.
--prefix-color flag sets the gnmic prompt prefix color
Defaults to dark blue.
The detailed explanation of the prompt command the the YANG-completions is provided on the Prompt mode and auto-suggestions page.