about summary refs log tree commit diff
path: root/Completion/Core/_list
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core/_list')
-rw-r--r--Completion/Core/_list12
1 files changed, 8 insertions, 4 deletions
diff --git a/Completion/Core/_list b/Completion/Core/_list
index f0bdda08a..803da2f71 100644
--- a/Completion/Core/_list
+++ b/Completion/Core/_list
@@ -4,11 +4,15 @@
 # insert possible completions only after the list has been shown at
 # least once.
 
-local pre suf
+local pre suf curcontext="$curcontext" expr
+
+# Probably set initial context.
+
+[[ -z "$curcontext" ]] && curcontext=':list'
 
 # Get the strings to compare.
 
-if [[ -z "$compconfig[list_word]" ]]; then
+if _style '' word; then
   pre="$HISTNO$LBUFFER"
   suf="$RBUFFER"
 else
@@ -18,8 +22,8 @@ fi
 
 # Should we only show a list now?
 
-if [[ ( -z "$compconfig[list_condition]" ||
-        "${(e):-\$[$compconfig[list_condition]]}" -eq 1 ) &&
+_style -s '' condition expr
+if [[ ( -z "$expr" || "${(e):-\$[$expr]}" -eq 1 ) &&
       ( "$pre" != "$_list_prefix" || "$suf" != "$_list_suffix" ) ]]; then
 
   # Yes. Tell the completion code about it and save the new values