mirror of https://github.com/spf13/cobra.git
fix: typo in {bash,zsh}_completions.go (#1459)
* Fix typo in bash_completions.go * Fix the same typo in zsh_completions.go
This commit is contained in:
parent
c3573e220c
commit
c7a4421715
|
@ -134,7 +134,7 @@ __%[1]s_handle_go_custom_completion()
|
||||||
$filteringCmd
|
$filteringCmd
|
||||||
elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
|
elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
|
||||||
# File completion for directories only
|
# File completion for directories only
|
||||||
local subDir
|
local subdir
|
||||||
# Use printf to strip any trailing newline
|
# Use printf to strip any trailing newline
|
||||||
subdir=$(printf "%%s" "${out[0]}")
|
subdir=$(printf "%%s" "${out[0]}")
|
||||||
if [ -n "$subdir" ]; then
|
if [ -n "$subdir" ]; then
|
||||||
|
|
|
@ -202,7 +202,7 @@ _%[1]s()
|
||||||
_arguments '*:filename:'"$filteringCmd"
|
_arguments '*:filename:'"$filteringCmd"
|
||||||
elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
|
elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
|
||||||
# File completion for directories only
|
# File completion for directories only
|
||||||
local subDir
|
local subdir
|
||||||
subdir="${completions[1]}"
|
subdir="${completions[1]}"
|
||||||
if [ -n "$subdir" ]; then
|
if [ -n "$subdir" ]; then
|
||||||
__%[1]s_debug "Listing directories in $subdir"
|
__%[1]s_debug "Listing directories in $subdir"
|
||||||
|
|
Loading…
Reference in New Issue