about summary refs log tree commit diff
path: root/Completion/Core/_list
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-15 12:01:46 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-15 12:01:46 +0000
commit35b2633ad941966f5fca07b625a594a5b68c0fdb (patch)
treeb54740d014e594ba5d81931cdcdb3387bcf9dfca /Completion/Core/_list
parentbb98460a01ce1f6c1e71f7e401f782c81b71486b (diff)
downloadzsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.tar.gz
zsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.tar.xz
zsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.zip
manual/8639
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