diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-07-28 20:58:12 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-07-28 20:58:12 +0200 |
commit | aed0b57ae3a27be8e285fce5ae46e48082c96f23 (patch) | |
tree | 6ec103266d83913a738ad1532389544a98e688fa | |
parent | 9660f414b8b49b9257d118a932f987ae6116963b (diff) | |
download | vyatta-op-aed0b57ae3a27be8e285fce5ae46e48082c96f23.tar.gz vyatta-op-aed0b57ae3a27be8e285fce5ae46e48082c96f23.zip |
Update the README.
-rw-r--r-- | README | 52 |
1 files changed, 4 insertions, 48 deletions
@@ -1,50 +1,6 @@ -This package has the Vyatta operational command completion script and -base template tree. The default root of this tree is: - /opt/vyatta/share/vyatta-op/templates +This package is legacy code. It is now in process of being rewritten. -Each directory within this tree is a respective command line argument; -for example, the .../templates/show/interfaces/ethernet directory -completes the command line "show interfaces ethernet". Thus, the -directory name is generally equivalent to the command or argument -name. The only exception are directories named "node.tag"; these -represent dynamic or variable command arguments. For example, -.../templates/show/interfaces/ethernet/node.tag completes the active -system interfaces like "show interfaces ethernet eth0". +See https://phabricator.vyos.net/T689 to join this effort. -Every template directory must have one and only one file named -"node.def". This file defines the node help string and run command, -like .../templates/show/interfaces/node.def: - -help: "Show network interface information" -run: ${vyatta_bindir}/vyatta-show-interfaces.pl --show - -Notes: - - field tags (i.e. "help:" and "run:") must be at the start of line - - try to limit help strings to 64 characters - - run commands may span multiple lines but subsequent lines must - not begin with "WORD:" - -The run command is an evaluated shell expression that may contain the -positional command line argument variables (i.e. $1, $*, $@). -However, since the command itself, is evaluated through an aliased -function, $1 is the command name rather than the usual $0. So, the -command "show interfaces ethernet eth0" would evaluate the respective -run command with $4 == eth0. - -The variable argument .../node.tag/node.def files may also define an -"allowed" field. This is a misnomer since it's really used to produce -a list of possible completions or additional help rather than what is -allowed during execution. The fields contents are evaluated shell -expression that outputs (stdout) the list of possible completion -values or symbolic help of the pattern '<*>'. A blank or missing -"allowed" field means that there is no completion for the respective -node; for such nodes a '*' placeholder tag is displayed with the help -text. - -Examples: - -.../templates/show/interfaces/ethernet/node.tag/node.def - -help: Show specified ethernet interface information -allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show ethernet -run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf="$4" +Read http://blog.vyos.net/new-style-operational-mode-command-definitions-are-here +to learn about the new op mode command definitions. |