From af259b89dcf8d2ca74ebbb6cefb1db4de6336146 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 19 Jan 2000 17:40:50 +0000 Subject: zsh-workers/9371 --- Completion/Core/_path_files | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Completion/Core/_path_files') diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index a53c5e10d..e76a54882 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -81,6 +81,20 @@ while getopts "P:S:qr:R:W:F:J:V:X:f/g:M:12n" opt; do esac done +if [[ -z "$_file_pat_checked" ]] && + zstyle -s ":completion${curcontext}:files" file-patterns tmp1 && + [[ -n "$tmp1" ]]; then + if [[ "$tmp1" = '*(-/)' ]]; then + gopt='' + sopt=-/ + else + gopt='-g' + sopt=- + fi + pats=( $=tmp1 ) + haspats=yes +fi + if (( ! ( $#group + $#expl ) )); then if [[ -z "$gopt" && "$sopt" = -/ ]]; then _description directories expl directory -- cgit 1.4.1