diff options
Diffstat (limited to 'community/go-task/completion-rename-to-go-task.patch')
-rw-r--r-- | community/go-task/completion-rename-to-go-task.patch | 86 |
1 files changed, 17 insertions, 69 deletions
diff --git a/community/go-task/completion-rename-to-go-task.patch b/community/go-task/completion-rename-to-go-task.patch index 502613cb487..13337b87346 100644 --- a/community/go-task/completion-rename-to-go-task.patch +++ b/community/go-task/completion-rename-to-go-task.patch @@ -1,79 +1,27 @@ -diff --git a/completion/bash/task.bash b/completion/bash/task.bash -index 2633eac..1830932 100644 --- a/completion/bash/task.bash +++ b/completion/bash/task.bash -@@ -6,7 +6,7 @@ _task_completion() - # Remove colon from word breaks - COMP_WORDBREAKS=${COMP_WORDBREAKS//:} - -- scripts=$(task -l | sed '1d' | awk '{ print $2 }' | sed 's/:$//'); -+ scripts=$(go-task -l | sed '1d' | awk '{ print $2 }' | sed 's/:$//'); - - curr_arg="${COMP_WORDS[COMP_CWORD]:-"."}" - -@@ -18,4 +18,4 @@ _task_completion() - COMPREPLY=($(compgen -c | echo "$scripts" | grep -- $curr_arg)); +@@ -52,4 +52,4 @@ + __ltrim_colon_completions "$cur" } --complete -F _task_completion task -+complete -F _task_completion go-task -diff --git a/completion/fish/task.fish b/completion/fish/task.fish -index 92a7478..cf7797b 100644 +-complete -F _task task ++complete -F _task go-task --- a/completion/fish/task.fish +++ b/completion/fish/task.fish -@@ -1,24 +1,24 @@ - function __task_get_tasks --description "Prints all available tasks with their description" -- task -l | sed '1d' | awk '{ $1=""; print $0 }' | sed 's/:\ /\t/g' | string trim -+ go-task -l | sed '1d' | awk '{ $1=""; print $0 }' | sed 's/:\ /\t/g' | string trim - end - --complete -c task -d 'Runs the specified task(s). Falls back to the "default" task if no task name was specified, or lists all tasks if an unknown task name was -+complete -c go-task -d 'Runs the specified task(s). Falls back to the "default" task if no task name was specified, or lists all tasks if an unknown task name was - specified.' -xa "(__task_get_tasks)" +@@ -1,4 +1,4 @@ +-set GO_TASK_PROGNAME task ++set GO_TASK_PROGNAME go-task - --complete -c task -s c -l color -d 'colored output (default true)' --complete -c task -s d -l dir -d 'sets directory of execution' --complete -c task -l dry -d 'compiles and prints tasks in the order that they would be run, without executing them' --complete -c task -s f -l force -d 'forces execution even when the task is up-to-date' --complete -c task -s h -l help -d 'shows Task usage' --complete -c task -s i -l init -d 'creates a new Taskfile.yml in the current folder' --complete -c task -s l -l list -d 'lists tasks with description of current Taskfile' --complete -c task -s o -l output -d 'sets output style: [interleaved|group|prefixed]' -xa "interleaved group prefixed" --complete -c task -s p -l parallel -d 'executes tasks provided on command line in parallel' --complete -c task -s s -l silent -d 'disables echoing' --complete -c task -l status -d 'exits with non-zero exit code if any of the given tasks is not up-to-date' --complete -c task -l summary -d 'show summary about a task' --complete -c task -s t -l taskfile -d 'choose which Taskfile to run. Defaults to "Taskfile.yml"' --complete -c task -s v -l verbose -d 'enables verbose mode' --complete -c task -l version -d 'show Task version' --complete -c task -s w -l watch -d 'enables watch of the given task' -+complete -c go-task -s c -l color -d 'colored output (default true)' -+complete -c go-task -s d -l dir -d 'sets directory of execution' -+complete -c go-task -l dry -d 'compiles and prints tasks in the order that they would be run, without executing them' -+complete -c go-task -s f -l force -d 'forces execution even when the task is up-to-date' -+complete -c go-task -s h -l help -d 'shows Task usage' -+complete -c go-task -s i -l init -d 'creates a new Taskfile.yml in the current folder' -+complete -c go-task -s l -l list -d 'lists tasks with description of current Taskfile' -+complete -c go-task -s o -l output -d 'sets output style: [interleaved|group|prefixed]' -xa "interleaved group prefixed" -+complete -c go-task -s p -l parallel -d 'executes tasks provided on command line in parallel' -+complete -c go-task -s s -l silent -d 'disables echoing' -+complete -c go-task -l status -d 'exits with non-zero exit code if any of the given tasks is not up-to-date' -+complete -c go-task -l summary -d 'show summary about a task' -+complete -c go-task -s t -l taskfile -d 'choose which Taskfile to run. Defaults to "Taskfile.yml"' -+complete -c go-task -s v -l verbose -d 'enables verbose mode' -+complete -c go-task -l version -d 'show Task version' -+complete -c go-task -s w -l watch -d 'enables watch of the given task' -diff --git a/completion/zsh/_task b/completion/zsh/_task -index 2bd4ac4..3a2100d 100755 + function __task_get_tasks --description "Prints all available tasks with their description" + # Read the list of tasks (and potential errors) --- a/completion/zsh/_task +++ b/completion/zsh/_task -@@ -5,7 +5,7 @@ function __list() { - local -a scripts +@@ -11,7 +11,7 @@ + local -i enabled=0 + local taskfile item task desc - if [ -f Taskfile.yml ] || [ -f Taskfile.yaml ]; then -- scripts=($(task -l | sed '1d' | sed 's/^\* //' | awk '{ print $1 }' | sed 's/:$//' | sed 's/:/\\:/g')) -+ scripts=($(go-task -l | sed '1d' | sed 's/^\* //' | awk '{ print $1 }' | sed 's/:$//' | sed 's/:/\\:/g')) - _describe 'script' scripts - fi - } +- cmd=(task) ++ cmd=(go-task) + taskfile="${(v)opt_args[(i)-t|--taskfile]}" + + if [[ -n "$taskfile" && -f "$taskfile" ]]; then |