completion: composer: Remove uneeded local "scripts" var

pull/1807/head
Noah Gorny 2021-02-06 00:19:05 +02:00
parent e9f28ff745
commit 0d963b224f
1 changed files with 1 additions and 8 deletions

View File

@ -3,17 +3,10 @@ cite "about-completion"
about-completion "composer completion"
function _composer() {
local cur script coms opts com
local cur coms opts com
COMPREPLY=()
_get_comp_words_by_ref -n : cur words
# for an alias, get the real script behind it
if [[ $(type -t "${words[0]}") == "alias" ]]; then
script=$(alias "${words[0]}" | sed -E "s/alias ${words[0]}='(.*)'/\1/")
else
script=${words[0]}
fi
# lookup for command
for word in "${words[@]:1}"; do
if [[ $word != -* ]]; then