about summary refs log tree commit diff
path: root/Completion/Base/_subscript
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Base/_subscript')
-rw-r--r--Completion/Base/_subscript13
1 files changed, 5 insertions, 8 deletions
diff --git a/Completion/Base/_subscript b/Completion/Base/_subscript
index 670739a9a..e783d04e7 100644
--- a/Completion/Base/_subscript
+++ b/Completion/Base/_subscript
@@ -1,10 +1,7 @@
 #defcomp -subscript-
 
-local ret=1
-
-_compalso -math- && ret=0
-
-[[ ${(Pt)${compstate[parameter]}} = assoc* ]] &&
-  compgen -k "( ${(kP)${compstate[parameter]}} )" && ret=0
-
-return ret
+if [[ ${(Pt)${compstate[parameter]}} = assoc* ]]; then
+  compgen -S ']' -k "( ${(kP)${compstate[parameter]}} )"
+else
+  _compalso -math-
+fi