summaryrefslogtreecommitdiff
path: root/functions/interpreter
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-10-11 10:53:32 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-10-11 10:54:03 -0500
commit56344c5d9072101d49a2fd541555566348ffac11 (patch)
tree27d93d23f1000af3cd83189f65dcddb2733020eb /functions/interpreter
parent49752cf738f5e4fafc11405b1a14a05379d2eca4 (diff)
downloadvyatta-op-56344c5d9072101d49a2fd541555566348ffac11.tar.gz
vyatta-op-56344c5d9072101d49a2fd541555566348ffac11.zip
Fix ambiguous error text so that it doesn't show node.def, generate the completions using compgen -d
Diffstat (limited to 'functions/interpreter')
-rw-r--r--functions/interpreter/vyatta-op-run2
1 files changed, 1 insertions, 1 deletions
diff --git a/functions/interpreter/vyatta-op-run b/functions/interpreter/vyatta-op-run
index 8508c71..b128000 100644
--- a/functions/interpreter/vyatta-op-run
+++ b/functions/interpreter/vyatta-op-run
@@ -132,7 +132,7 @@ _vyatta_op_run ()
# output proper error message based on the above expansion
if [[ "${arg[1]}" == "ambiguous" ]]; then
echo -ne "\n Ambiguous command: ${args[@]} [$arg]\n"
- local -a cmds=( "$tpath/$arg"* )
+ local -a cmds=( $(compgen -d $tpath/$arg) )
_vyatta_op_node_path=$tpath
local comps=$(_vyatta_op_help $arg ${cmds[@]##*/})
echo -e "$comps\n" | sed -e 's/^P/ P/'