From 46ed0425ebde3e026b402026cd633bef7c2b6c5f Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Thu, 26 Aug 2010 13:58:17 -0700 Subject: new implementation for config output * replace the original ConfigOutput perl module. * simplify logic and fix bugs in original code. --- etc/bash_completion.d/20vyatta-cfg | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'etc/bash_completion.d/20vyatta-cfg') diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index 56c1272..f6b02ce 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -84,19 +84,15 @@ done show () { - local show_all='' local -a args=() for arg in "$@"; do if [ "$arg" == "-all" ]; then - show_all='-all' + args+=('--show-show-defaults') else - args[${#args[@]}]="$arg" + args+=("$arg") fi done - local level=$(vyatta_cli_shell_api NOEVAL getEditLevelStr) - ${vyatta_sbindir}/vyatta-output-config.pl ${show_all} \ - $level ${args[@]} \ - | eval "${VYATTA_PAGER:-cat}" + cli-shell-api showCfg "${args[@]}" | eval "${VYATTA_PAGER:-cat}" } commit () -- cgit v1.2.3