Skip to content

Commit 193c632

Browse files
author
Ira Abramov
committed
solution is kosher but stincky, shellcheck hates it for a good reason.
1 parent 2d56bfe commit 193c632

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

completion/available/artisan.completion.bash

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ about-completion "Laravel artisan completion"
44

55
# Completion function for Laravel artisan
66
_artisan_completion() {
7-
local cur commands
7+
local cur artisan_commands
88
COMPREPLY=()
99
cur="${COMP_WORDS[COMP_CWORD]}"
1010

@@ -15,10 +15,11 @@ _artisan_completion() {
1515

1616
# Get list of available artisan commands
1717
# Use command prefix to bypass user aliases
18-
commands=$(command php artisan --raw --no-ansi list 2> /dev/null | command sed "s/[[:space:]].*//")
18+
# shellcheck disable=SC2034
19+
artisan_commands=$(command php artisan --raw --no-ansi list 2> /dev/null | command sed "s/[[:space:]].*//")
1920

20-
# shellcheck disable=SC2034,SC2207
21-
COMPREPLY=($(compgen -W '${commands}' -- "${cur}"))
21+
# shellcheck disable=SC2016,SC2207
22+
COMPREPLY=($(compgen -W '${artisan_commands}' -- "${cur}"))
2223
return 0
2324
}
2425

0 commit comments

Comments
 (0)