From 208bb6375e94498d918831b3dd04f539a6f8189a Mon Sep 17 00:00:00 2001 From: gi1242 Date: Sun, 5 May 2024 10:10:29 -0400 Subject: [PATCH] zsh: better local directory completion (#787) --- templates/zsh.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/zsh.txt b/templates/zsh.txt index d110154..b51bd9b 100644 --- a/templates/zsh.txt +++ b/templates/zsh.txt @@ -98,7 +98,8 @@ if [[ -o zle ]]; then if [[ "{{ "${#words[@]}" }}" -eq 2 ]]; then # Show completions for local directories. - _files -/ + _cd -/ + elif [[ "${words[-1]}" == '' ]]; then # Show completions for Space-Tab. # shellcheck disable=SC2086