From 7eb928e2663197d52898b55cd2ccbe10c3222236 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 13 Sep 1999 10:41:28 +0000 Subject: manual/7796 --- Completion/Core/_display | 5 +++-- Completion/Core/_list | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'Completion/Core') diff --git a/Completion/Core/_display b/Completion/Core/_display index 210e866ec..d23361653 100644 --- a/Completion/Core/_display +++ b/Completion/Core/_display @@ -23,11 +23,12 @@ local _param="$1" _arr _len _i _tmp _simple # Remove all descriptions not matched by the string on the line. if [[ "${2[1]}" = \( ]]; then - _arr=( ${(o)=2[2,-2]} ) + _arr=( ${(Qo)=2[2,-2]} ) else _arr=( "${(@Po)2}" ) fi +_arr=( "${(@)_arr:#}" ) compadd -D _arr "${(@)argv[3,-1]}" - "${(@)_arr%%:*}" [[ "${2[1]}" != \( ]] && eval "${2}=( \"\$_arr[@]\" )" @@ -68,7 +69,7 @@ ${(r:_len:: :)_i%%:*} -- ${_i#*:}" (( $#_simple )) && _tmp="${_tmp} $(print -c - $_simple)" - eval "${_param}=${(q)_tmp[2,-1]}" + eval "${_param}=\"\${_tmp[2,-1]}\"" return 0 else diff --git a/Completion/Core/_list b/Completion/Core/_list index 28a5161d1..25dcdfe8f 100644 --- a/Completion/Core/_list +++ b/Completion/Core/_list @@ -43,7 +43,7 @@ fi # Should we only show a list now? if [[ ( -z "$compconfig[list_condition]" || - "${(e):-\$[$compconfig[expand_glob]]}" -eq 1 ) && + "${(e):-\$[$compconfig[list_condition]]}" -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