diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-10-26 15:36:10 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-10-26 15:36:10 +0000 |
commit | e0b26186f1d3c1a3a580eb7e8a8199c25536f4e6 (patch) | |
tree | e4247c2507fa1a135740a3cd02e7405cbdbfa69a /Completion/Core/_path_files | |
parent | 56f338eb8bfd4bcdbf14b495ff8a34425c3527d4 (diff) | |
download | zsh-e0b26186f1d3c1a3a580eb7e8a8199c25536f4e6.tar.gz zsh-e0b26186f1d3c1a3a580eb7e8a8199c25536f4e6.tar.xz zsh-e0b26186f1d3c1a3a580eb7e8a8199c25536f4e6.zip |
manual/8424
Diffstat (limited to 'Completion/Core/_path_files')
-rw-r--r-- | Completion/Core/_path_files | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index 9d44180c8..cbec82c8a 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -10,7 +10,7 @@ local nm=$compstate[nmatches] menu match matcher typeset -U prepaths exppaths -setopt localoptions nullglob rcexpandparam extendedglob +setopt localoptions nullglob rcexpandparam unsetopt markdirs globsubst shwordsplit nounset local sopt='-' gopt='' opt @@ -110,36 +110,6 @@ orig="${PREFIX}${SUFFIX}" ( $#compstate[pattern_match] -ne 0 && "${orig#\~}" != "${${orig#\~}:q}" ) ]] && menu=yes -# We will first try normal completion called with `compgen', but only if we -# weren't given a `-F', `-r', or `-R' option or we are in the string. - -if [[ -z "$suf" && $#ignore -eq 0 && $#remsfx -eq 0 && - -z "$_comp_correct" ]]; then - # First build an array containing the `-W' option, if there is any and we - # want to use it. We don't want to use it if the string from the command line - # is a absolute path or relative to the current directory. - - if [[ -z "$prepaths[1]" || "$pre[1]" = [~/] || "$pre" = (.|..)/* ]]; then - tmp1=() - else - tmp1=(-W "( $prepaths )") - fi - - # Now call compgen. - - if [[ -z "$gopt" ]]; then - compgen "$addpfx[@]" "$addsfx[@]" "$group[@]" "$expl[@]" \ - "$tmp1[@]" "$matcher[@]" $sopt - else - compgen "$addpfx[@]" "$addsfx[@]" "$group[@]" "$expl[@]" \ - "$tmp1[@]" "$matcher[@]" $sopt -g "$pats" - fi - - # If this generated any matches, we don't want to do in-path completion. - - [[ compstate[nmatches] -eq nm ]] || return 0 -fi - # If given no `-F' option, we want to use `fignore'. (( $#ignore )) || ignore=(-F fignore) |