From bfa4f17652830a69698d180435a0df045843723e Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Wed, 26 Apr 2000 06:12:25 +0000 Subject: file-sort made $fignore fail (10922) --- Completion/Core/_path_files | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'Completion') diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index 10fe39869..31b8dff66 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -86,6 +86,19 @@ if (( ! $mopts[(I)-[JVX]] )); then mopts=( "$mopts[@]" "$expl[@]" ) fi +# If given no `-F' option, we may want to use $fignore, turned into patterns. + +[[ -z "$_comp_no_ignore" && $#ignore -eq 0 && + ( -z $gopt || "$pats" = \ #\*\ # ) && -n $FIGNORE ]] && + ignore=( "?*${^fignore[@]}" ) + +if (( $#ignore )); then + _comp_ignore=( "$_comp_ignore[@]" "$ignore[@]" ) + (( $mopts[(I)-F] )) || mopts=( "$mopts[@]" -F _comp_ignore ) +fi + +(( $#matcher )) && mopts=( "$mopts[@]" "$matcher[@]" ) + if zstyle -s ":completion:${curcontext}:files" file-sort tmp1; then case "$tmp1" in *size*) sort=oL;; @@ -140,19 +153,6 @@ eorig="$orig" ( -n "$compstate[pattern_match]" && "${orig#\~}" != "${${orig#\~}:q}" ) ]] && menu=yes -# If given no `-F' option, we may want to use $fignore, turned into patterns. - -[[ -z "$_comp_no_ignore" && $#ignore -eq 0 && - ( -z $gopt || "$pats" = \ #\*\ # ) && -n $FIGNORE ]] && - ignore=( "?*${^fignore[@]}" ) - -if (( $#ignore )); then - _comp_ignore=( "$_comp_ignore[@]" "$ignore[@]" ) - (( $mopts[(I)-F] )) || mopts=( "$mopts[@]" -F _comp_ignore ) -fi - -(( $#matcher )) && mopts=( "$mopts[@]" "$matcher[@]" ) - # Now let's have a closer look at the string to complete. if [[ "$pre[1]" = \~ ]]; then -- cgit 1.4.1