Commit 5651335c authored by Marco Kellershoff's avatar Marco Kellershoff 🤸

Update to new Taskfile format

parent 4a5b2e43
#!/bin/bash
# This task needs to left as it is
# This is for external plugins and programs to query the available tasks
function __show_tasks {
compgen -A function | grep -v "^_"
}
# Helper functions start with _ and are invisible to bash auto completion.
function _get_random_number {
local min=$1
......@@ -32,19 +38,13 @@ function build-all {
function help {
echo "$0 <task> <args>"
echo "Tasks:"
tasks | cat -n
}
# This task needs to left as it is
# This is for external plugins and programs to query the available tasks
function tasks {
compgen -A function | grep -v "^_"
__show_tasks | cat -n
}
# This is a wrapper for what should be executed, when no args are passed to the
# Taskfile
function default {
tasks
__show_tasks
}
${@:-default}
......
......@@ -50,11 +50,11 @@ function! s:OnTermEventHandler(job_id, data, event) dict
if a:event == 'stdout'
" do nothing
elseif a:event == 'stderr'
" do nothing
elseif a:data == 0
execute s:TaskfileWindow . "windo startinsert!"
else
elseif a:data == 0
" do nothing
else
execute s:TaskfileWindow . "windo startinsert!"
endif
endfunction
......@@ -92,7 +92,7 @@ endfunction
function! s:GetAllTasks()
let filepath = s:GetTaskfileAbsoluteFilepath()
let tasklist = systemlist(filepath . " tasks")
let tasklist = systemlist(filepath . " __show_tasks")
return tasklist
endfunction
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment