diff options
Diffstat (limited to 'Completion/Base')
-rwxr-xr-x | Completion/Base/_in_vared | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Completion/Base/_in_vared b/Completion/Base/_in_vared index 4d8e814db..c21601cdf 100755 --- a/Completion/Base/_in_vared +++ b/Completion/Base/_in_vared @@ -5,10 +5,17 @@ local also # Completion inside vared. if [[ $compstate[vared] = *\[* ]]; then - # vared on an array-element - compstate[parameter]=${compstate[vared]%%\[*} - compstate[context]=-value- - also=value + if [[ $compstate[vared] = *\]* ]]; then + # vared on an array-element + compstate[parameter]=${${compstate[vared]%%\]*}//\[/-} + compstate[context]=value + also=-value- + else + # vared on an array-value + compstate[parameter]=${compstate[vared]%%\[*} + compstate[context]=value + also=-value- + fi else # vared on a parameter, let's see if it is an array compstate[parameter]=$compstate[vared] |