diff --git a/bash_completions.go b/bash_completions.go index 848f770..f8f6bef 100644 --- a/bash_completions.go +++ b/bash_completions.go @@ -134,7 +134,7 @@ __%[1]s_handle_go_custom_completion() $filteringCmd elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then # File completion for directories only - local subDir + local subdir # Use printf to strip any trailing newline subdir=$(printf "%%s" "${out[0]}") if [ -n "$subdir" ]; then diff --git a/zsh_completions.go b/zsh_completions.go index 1afec30..36774b6 100644 --- a/zsh_completions.go +++ b/zsh_completions.go @@ -202,7 +202,7 @@ _%[1]s() _arguments '*:filename:'"$filteringCmd" elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then # File completion for directories only - local subDir + local subdir subdir="${completions[1]}" if [ -n "$subdir" ]; then __%[1]s_debug "Listing directories in $subdir"