diff options
author | Tom Grennan <tgrennan@vyatta.com> | 2007-10-05 14:10:16 -0700 |
---|---|---|
committer | Tom Grennan <tgrennan@vyatta.com> | 2007-10-05 14:10:16 -0700 |
commit | 067320a0aa36ba97d64ff5473d4ad0b3877774e4 (patch) | |
tree | a97e96bf6305b8a53d06f8e7018637a1f8fc7d6d /README | |
parent | fd141a3ac06bdbf52f38a7be6d72a392d951b67d (diff) | |
download | vyatta-op-067320a0aa36ba97d64ff5473d4ad0b3877774e4.tar.gz vyatta-op-067320a0aa36ba97d64ff5473d4ad0b3877774e4.zip |
Use empty or missing "allowed:" fields in node.tag/node.def as wild
cards rather than "echo -n --".
Also, discoverd a way to use an apparently blank line in help completion.
Diffstat (limited to 'README')
-rw-r--r-- | README | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -31,17 +31,18 @@ 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 must also define an -"allowed" value field that is a shell expression that outputs (stdout) -the list of values; -like .../templates/show/interfaces/ethernet/node.tag/node.def: +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 rather than what is allowed during +execution. The fields contents are evaluated shell expression that +outputs (stdout) the list of possible completion values; like +.../templates/show/interfaces/ethernet/node.tag/node.def: help: "Show given ethernet interface information" allowed: local -a array=( /sys/class/net/{eth,vmnet}* ) ; echo -n ${array[@]##*/} run: ${vyatta_bindir}/vyatta-show-interfaces ethernet $4 -You may use the "--" wild card, for variable arguments with no -possible completion: - -allowed: echo -n -- +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. |