From e3e37114832539fb915f0c44125eae492d7b1491 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Sat, 25 Sep 1999 11:12:08 +0000 Subject: zsh-workers/8044 --- Completion/Base/_regex_arguments | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Completion/Base/_regex_arguments') diff --git a/Completion/Base/_regex_arguments b/Completion/Base/_regex_arguments index bbf8a2e5b..a89bb19b4 100644 --- a/Completion/Base/_regex_arguments +++ b/Completion/Base/_regex_arguments @@ -247,16 +247,17 @@ _ra_gen_func () { } _ra_gen_parse_state () { - local actions i + local actions i p test='if' for index in $=tbl[$state]; do if [[ "$pattern[$index]" != "[]" ]]; then + p="$pattern[$index]$lookahead[$index]*" if [[ -z "$guard[$index]" ]]; then print -lr - \ - "$test [[ \$_ra_right = $pattern[$index]$lookahead[$index]* ]]" + "$test [[ \$_ra_right = \${~:-${(qqqq)p}} ]]" else print -lr - \ - "$test [[ \$_ra_right = $pattern[$index]$lookahead[$index]* ]] && {" \ + "$test [[ \$_ra_right = \${~:-${(qqqq)p}} ]] && {" \ "$guard[$index]" \ "}" fi @@ -365,7 +366,7 @@ _regex_arguments () { if [[ -d "$cache_dir" && -w "$cache_dir" ]]; then print -lr - \ - 'if [[ $# -eq '$#' && "$*" = '"${*:q}"' ]]; then' \ + 'if [[ $# -eq '$#' && "$*" = '"${(qqqq)*}"' ]]; then' \ "$funcdef" \ 'true; else false; fi' > "${cache_file}.$HOST.$$" source "${cache_file}.$HOST.$$" "$@" -- cgit 1.4.1