diff options
Diffstat (limited to 'Completion/Zsh/Command/_cd')
-rw-r--r-- | Completion/Zsh/Command/_cd | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Completion/Zsh/Command/_cd b/Completion/Zsh/Command/_cd index 306855bc8..3c19f82da 100644 --- a/Completion/Zsh/Command/_cd +++ b/Completion/Zsh/Command/_cd @@ -67,14 +67,15 @@ else # Don't complete local directories in command position, that's # already handled by _command_names (see _autocd) - [[ CURRENT -ne 1 ]] && + [[ CURRENT -ne 1 || ( -z "$path[(r).]" && $PREFIX != */* ) ]] && alt=( "${cdpath+local-}directories:${cdpath+local }directory:_path_files -/" "$alt[@]" ) _alternative "$alt[@]" && ret=0 return ret fi - _wanted directories expl directory _path_files -/ && ret=0 + [[ CURRENT -ne 1 ]] && _wanted directories expl directory \ + _path_files -/ && ret=0 return ret fi |