diff options
author | Michael Larson <slioch@slioch.vyatta.com> | 2010-05-04 17:54:56 -0700 |
---|---|---|
committer | Michael Larson <slioch@slioch.vyatta.com> | 2010-05-04 17:54:56 -0700 |
commit | 0ffdc5e6d89f9677694a8eef916b07c089264753 (patch) | |
tree | 08f9693bdad87301ebb1306de73d77888df84413 /etc | |
parent | 576e0fed6b0e32bb92915a10f95677303eda478a (diff) | |
download | vyatta-cfg-0ffdc5e6d89f9677694a8eef916b07c089264753.tar.gz vyatta-cfg-0ffdc5e6d89f9677694a8eef916b07c089264753.zip |
initial working version of activate and deactivate: load,save,show,commit supported.
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/bash_completion.d/20vyatta-cfg | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index 4463ee3..e17fd36 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -431,6 +431,18 @@ loadkey() eval "${vyatta_sbindir}/vyatta-load-user-key.pl $@" } +activate() +{ + #create or remove activate file + eval "${vyatta_sbindir}/vyatta-activate-config.pl activate $@" +} + +deactivate() +{ + #create or remove activate file + eval "${vyatta_sbindir}/vyatta-activate-config.pl deactivate $@" +} + vyatta_loadkey_complete() { case "$COMP_CWORD" in @@ -929,8 +941,10 @@ vyatta_config_complete () fi if (( ${#COMP_WORDS[@]} < 2 )); then - declare -a hitems=( "commit" \ + declare -a hitems=( "activate" \ + "commit" \ "copy" \ + "deactivate" \ "delete" \ "discard" \ "edit" \ @@ -944,8 +958,10 @@ vyatta_config_complete () "set" \ "show" ) declare -a hstrs=( \ + "Enable this portion of the configuration" \ "Commit the current set of changes" \ "Copy a configuration element" \ + "Inactivate this portion of the configuration" \ "Delete a configuration element" \ "Discard uncommitted changes" \ "Edit a sub-element" \ @@ -1294,6 +1310,8 @@ complete -F vyatta_loadsave_complete save complete -F vyatta_loadsave_complete load complete -F vyatta_loadsave_complete merge complete -F vyatta_loadkey_complete loadkey +complete -F vyatta_config_complete activate +complete -F vyatta_config_complete deactivate complete -F vyatta_config_complete copy complete -F vyatta_config_complete rename |