diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-29 14:50:40 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-29 14:50:40 -0700 |
commit | 2cc65f95744125844c4444715ce24eb6d9c56b82 (patch) | |
tree | 71c11fee3ab90a7e68ff079f4a9a6adf82545cee | |
parent | 0ad60e798fc8258a2890143e06120769e00fa5b7 (diff) | |
parent | 73c104cf5cdc67ef2fd3a3fb0ba0071536fdf0ac (diff) | |
download | vyatta-cfg-2cc65f95744125844c4444715ce24eb6d9c56b82.tar.gz vyatta-cfg-2cc65f95744125844c4444715ce24eb6d9c56b82.zip |
Merge branch 'jenner' of suva.vyatta.com:/git/vyatta-cfg into jenner
-rw-r--r-- | debian/changelog | 7 | ||||
-rwxr-xr-x | etc/bash_completion.d/20vyatta-cfg | 53 |
2 files changed, 60 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index fb8ec25..081f3d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +vyatta-cfg (0.14.89) unstable; urgency=low + + * Bugfix 4235: Add help text for "load" and "save" commands in config + mode. + + -- Bob Gilligan <gilligan@vyatta.com> Thu, 28 May 2009 14:53:32 -0700 + vyatta-cfg (0.14.88) unstable; urgency=low * fix for bug 4212 and bug 4434. diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index ef8810a..34724f8 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -373,6 +373,57 @@ vyatta_run_complete () eval $restore_shopts } +vyatta_save_complete() +{ + # Generate completion help for the "save" command + local restore_shopts=$( shopt -p extglob nullglob | tr \\n \; ) + shopt -s extglob nullglob + + if (( $COMP_CWORD <= 1 )); then + echo + echo "Possible completions:" + echo -e " <file>\t\t\t\tSave to file on local machine" + echo -e " scp://<user>:<passwd>@<host>/<file>\tSave to file on remote machine" + echo -e " ftp://<user>:<passwd>@<host>/<file>\tSave to file on remote machine" + echo -e " tftp://<host>/<file>\t\t\tSave to file on remote machine" + + COMP_WORDS=( "${COMP_WORDS[@]:1}" ) + (( COMP_CWORD -= 1 )) + COMPREPLY=( "" " " ) + else + COMPREPLY=() + fi + + eval $restore_shopts +} + +vyatta_load_complete() +{ + # Generate completion help for the "load" command + local restore_shopts=$( shopt -p extglob nullglob | tr \\n \; ) + shopt -s extglob nullglob + + if (( $COMP_CWORD <= 1 )); then + echo + echo "Possible completions:" + echo -e " <file>\t\t\t\tLoad from file on local machine" + echo -e " scp://<user>:<passwd>@<host>/<file>\tLoad from file on remote machine" + echo -e " ftp://<user>:<passwd>@<host>/<file>\tLoad from file on remote machine" + echo -e " http://<user>:<passwd>@<host>/<file>\tLoad from file on remote machine" + echo -e " tftp://<host>/<file>\t\t\tLoad from to file on remote machine" + + COMP_WORDS=( "${COMP_WORDS[@]:1}" ) + (( COMP_CWORD -= 1 )) + COMPREPLY=( "" " " ) + else + COMPREPLY=() + fi + + eval $restore_shopts +} + + + declare v_cfg_completion_debug=0 decho () { @@ -1167,6 +1218,8 @@ complete -F vyatta_config_complete show complete -F vyatta_config_complete edit complete -F vyatta_config_complete exit complete -F vyatta_run_complete run +complete -F vyatta_save_complete save +complete -F vyatta_load_complete load # Local Variables: # mode: shell-script |