diff options
Diffstat (limited to 'etc/bash_completion.d/20vyatta-cfg')
-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 |