From 42566a9f60cf452b9835f1a1f24b60c2d7f3cbc5 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Tue, 9 Aug 2011 18:30:11 -0500 Subject: Fix edit level in path validation function for short commands --- functions/interpreter/vyatta-cfg-run | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'functions') diff --git a/functions/interpreter/vyatta-cfg-run b/functions/interpreter/vyatta-cfg-run index c226e74..40fa5bb 100644 --- a/functions/interpreter/vyatta-cfg-run +++ b/functions/interpreter/vyatta-cfg-run @@ -352,6 +352,7 @@ vyatta_cfg_validate_cmd () { local cmd=$1 local -a expanded_api_args=( "$@" ) + local editlvl=$(cli-shell-api getEditLevelStr) local path='' local opath='' for arg in "${expanded_api_args[@]:1}"; do @@ -360,7 +361,7 @@ vyatta_cfg_validate_cmd () else path="$path $arg" fi - if ! cli-shell-api validateTmplPath ${path}; then + if ! cli-shell-api validateTmplPath ${editlvl} ${path}; then _cli_shell_api_comp_values=() vyatta_cli_shell_api getCompletionEnv $cmd ${path} if [[ "${#_cli_shell_api_comp_values[@]}" != "1" -- cgit v1.2.3