diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:20:19 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:20:19 +0000 |
commit | 04a89199d02a3ee6c4b3d89a6c782bdb0a4f1bc8 (patch) | |
tree | 2215f99f95d55660fc939a029bf965c454d080b5 /Completion/Core/_files | |
parent | 7a0415cfd70a02b2280d27556c6c54cef1c86e1a (diff) | |
download | zsh-04a89199d02a3ee6c4b3d89a6c782bdb0a4f1bc8.tar.gz zsh-04a89199d02a3ee6c4b3d89a6c782bdb0a4f1bc8.tar.xz zsh-04a89199d02a3ee6c4b3d89a6c782bdb0a4f1bc8.zip |
zsh-3.1.5-pws-12 zsh-3.1.5-pws-12
Diffstat (limited to 'Completion/Core/_files')
-rw-r--r-- | Completion/Core/_files | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Completion/Core/_files b/Completion/Core/_files index 471824bfe..506ddbc8e 100644 --- a/Completion/Core/_files +++ b/Completion/Core/_files @@ -3,10 +3,9 @@ # Utility function for completing files of a given type or any file. # In many cases you will want to call this one instead of _path_files(). -local nm=$compstate[nmatches] ret +local nm=$compstate[nmatches] ret=1 -_path_files "$@" -ret=$? +_path_files "$@" && ret=0 if [[ $# -ne 0 && compstate[nmatches] -eq nm ]]; then local opt opts @@ -23,7 +22,7 @@ if [[ $# -ne 0 && compstate[nmatches] -eq nm ]]; then [[ "$opt" = [PSWFJVX] ]] && opts=("$opts[@]" "-$opt" "$OPTARG") done - _path_files "$opts[@]" -else - return $ret + _path_files "$opts[@]" && ret=0 fi + +return ret |