mirror of
https://github.com/go-task/task.git
synced 2025-04-27 12:32:25 +02:00
Address shellcheck warnings in task.bash
This commit is contained in:
parent
2ad4054133
commit
591561f657
@ -1,4 +1,4 @@
|
|||||||
# /bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
_task_completion()
|
_task_completion()
|
||||||
{
|
{
|
||||||
@ -7,12 +7,14 @@ _task_completion()
|
|||||||
|
|
||||||
case "$cur" in
|
case "$cur" in
|
||||||
--*)
|
--*)
|
||||||
local options="$(_parse_help task)"
|
local options
|
||||||
COMPREPLY=( $(compgen -W "$options" -- "$cur") )
|
options="$(_parse_help task)"
|
||||||
|
mapfile -t COMPREPLY < <(compgen -W "$options" -- "$cur")
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
local tasks="$(task --list-all | awk 'NR>1 { sub(/:$/,"",$2); print $2 }')"
|
local tasks
|
||||||
COMPREPLY=( $(compgen -W "$tasks" -- "$cur") )
|
tasks="$(task --list-all | awk 'NR>1 { sub(/:$/,"",$2); print $2 }')"
|
||||||
|
mapfile -t COMPREPLY < <(compgen -W "$tasks" -- "$cur")
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user