summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-10-26 11:21:19 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-10-26 11:21:19 -0500
commitbe4b5f10b78a12acde8aeeba7073649677fb3953 (patch)
tree69b45a31e6baf28059a6ff8375226de660c1472f /functions
parent0afc8b03a892d426dcc4bc943beec5fb595c5800 (diff)
downloadvyatta-cfg-be4b5f10b78a12acde8aeeba7073649677fb3953.tar.gz
vyatta-cfg-be4b5f10b78a12acde8aeeba7073649677fb3953.zip
Fix 'show -all'
Diffstat (limited to 'functions')
-rw-r--r--functions/interpreter/vyatta-cfg-run12
1 files changed, 11 insertions, 1 deletions
diff --git a/functions/interpreter/vyatta-cfg-run b/functions/interpreter/vyatta-cfg-run
index 524763d..25217b2 100644
--- a/functions/interpreter/vyatta-cfg-run
+++ b/functions/interpreter/vyatta-cfg-run
@@ -487,7 +487,17 @@ vyatta_cfg_cmd ()
local -a expanded_api_args=()
local editlvl=$(cli-shell-api getEditLevelStr)
vyatta_config_expand_compwords "${args[@]}"
- if cli-shell-api validateTmplPath -- ${editlvl[*]} "${expanded_api_args[@]:1}"; then
+ if [[ "${expanded_api_args[@]:$[${#expanded_api_args[@]}-1]}" == "-all" ]] &&
+ [[ "${expanded_api_args[0]}" == "show" ]]; then
+ if [[ $[${#expanded_api_args[@]}-2] -eq 0 ]]; then
+ vyatta_cfg_cmd_run "${expanded_api_args[@]}"
+ elif cli-shell-api validateTmplPath -- ${editlvl[*]} \
+ "${expanded_api_args[@]:1:$[${#expanded_api_args[@]}-2]}"; then
+ vyatta_cfg_cmd_run "${expanded_api_args[@]}"
+ else
+ vyatta_cfg_validate_cmd "${expanded_api_args[@]}"
+ fi
+ elif cli-shell-api validateTmplPath -- ${editlvl[*]} "${expanded_api_args[@]:1}"; then
vyatta_cfg_cmd_run "${expanded_api_args[@]}"
else
# find broken portion of command