From ea1ca76e82912a1bde5be013c042892092cb6205 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Fri, 21 Oct 2011 15:25:09 -0500 Subject: Bugfix 7577: Only show the remote uri help if there is no completion --- functions/interpreter/vyatta-image-complete | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'functions/interpreter') diff --git a/functions/interpreter/vyatta-image-complete b/functions/interpreter/vyatta-image-complete index 130fa13..622123b 100644 --- a/functions/interpreter/vyatta-image-complete +++ b/functions/interpreter/vyatta-image-complete @@ -51,6 +51,10 @@ _vyatta_image_file_complete() _vyatta_image_path_complete } +declare -a non_comps=( "http://:@/" \ + "scp://:@/" \ + "ftp://:@/" \ + "tftp:///" ) _vyatta_image_path_complete() { @@ -59,6 +63,7 @@ _vyatta_image_path_complete() if _vyatta_image_is_file $cur ; then foundfile=1 _vyatta_op_completions=( "${cur} " ) + _vyatta_op_noncompletions=( ) return 0; fi if [[ ${cur:0:1} =~ "/" ]]; then @@ -80,7 +85,9 @@ _vyatta_image_path_complete() if [[ -d /live/image/opt/vyatta/etc/config || -d /live/image/config ]]; then reply+=( "disk-install://" ) fi + _vyatta_op_noncompletions=( "${non_comps[@]}" ) else + _vyatta_op_noncompletions=( ) if ! [[ $cur =~ .*:\/\/ ]]; then if [[ $cur =~ .*:\/ ]]; then cur=${cur/:\//} -- cgit v1.2.3