From 35b2633ad941966f5fca07b625a594a5b68c0fdb Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 15 Nov 1999 12:01:46 +0000 Subject: manual/8639 --- Completion/Core/_list | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Completion/Core/_list') 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 -- cgit 1.4.1