diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-08-09 18:30:11 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-08-09 18:30:11 -0500 |
commit | 42566a9f60cf452b9835f1a1f24b60c2d7f3cbc5 (patch) | |
tree | a1314c145d8cdf10134162468713583e3c54efb3 /functions/interpreter/vyatta-cfg-run | |
parent | 3103c75f927c861c4269d488787f877d8ba240a4 (diff) | |
download | vyatta-cfg-42566a9f60cf452b9835f1a1f24b60c2d7f3cbc5.tar.gz vyatta-cfg-42566a9f60cf452b9835f1a1f24b60c2d7f3cbc5.zip |
Fix edit level in path validation function for short commands
Diffstat (limited to 'functions/interpreter/vyatta-cfg-run')
-rw-r--r-- | functions/interpreter/vyatta-cfg-run | 3 |
1 files changed, 2 insertions, 1 deletions
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" |