summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorTom Grennan <tgrennan@io.vyatta.com>2007-12-03 11:53:19 -0800
committerTom Grennan <tgrennan@io.vyatta.com>2007-12-03 11:53:19 -0800
commitf6c43afe8c32bf3a3b2c7d5f4c6d36f7ec17db13 (patch)
treeb27b14a3945a9e810a17a7b4769921c291d562e6 /README
parentf2601e919104a4cd541e3874299b6fe1387e10dc (diff)
downloadvyatta-op-f6c43afe8c32bf3a3b2c7d5f4c6d36f7ec17db13.tar.gz
vyatta-op-f6c43afe8c32bf3a3b2c7d5f4c6d36f7ec17db13.zip
include description of symbolic help
Diffstat (limited to 'README')
-rw-r--r--README30
1 files changed, 22 insertions, 8 deletions
diff --git a/README b/README
index 7d69913..0c9e6f5 100644
--- a/README
+++ b/README
@@ -19,7 +19,7 @@ help: "Show network interface information"
run: ${vyatta_bindir}/vyatta-show-interfaces
Notes:
- - field tags (i.e. help and run) must be at the start of line
+ - 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:"
@@ -33,16 +33,30 @@ 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 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:
+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 given ethernet interface information"
allowed: local -a array=( /sys/class/net/{eth,vmnet}* ) ;
echo -n ${array[@]##*/}
run: ${vyatta_bindir}/vyatta-show-interfaces ethernet $4
-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.
+
+.../templates/terminal/length/node.tag/node.def
+
+help: Set terminal to given number of rows (0 disables paging)
+allowed: echo -n '<NUMBER>'
+run: if [ "$3" -eq 0 ] ; then
+ VYATTA_PAGER=cat
+ else
+ stty rows $3
+ fi