Skip to content

Commit 53069e2

Browse files
authored
Merge pull request #36207 from atrick/autocomplete-zsh
swift-autocomplete.bash, rename 'options' for zsh compat
2 parents dcd3c6f + 1fa76ba commit 53069e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/swift-autocomplete.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ _swift_complete()
161161
if [[ ${prevWord} == "-Xfrontend" ]] || echo ${COMP_WORDS[@]} | grep --quiet -e '-frontend' ; then
162162
frontendOption="-frontend"
163163
fi
164-
options=`${tool} ${frontendOption} -help-hidden 2>/dev/null | grep '^ *-[a-zA-Z-]' | sed -E 's/^ *(-[a-zA-Z=-]+).*/\1/'`
165-
COMPREPLY=( $(compgen -W "${options}" -- ${currentWord}) )
164+
toolOptions=`${tool} ${frontendOption} -help-hidden 2>/dev/null | grep '^ *-[a-zA-Z-]' | sed -E 's/^ *(-[a-zA-Z=-]+).*/\1/'`
165+
COMPREPLY=( $(compgen -W "${toolOptions}" -- ${currentWord}) )
166166
fi
167167
return 0
168168
}

0 commit comments

Comments
 (0)