mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Initial support for context and focus (see Issue #218).
This commit is contained in:
parent
235fb9f054
commit
ac811c6930
4 changed files with 64 additions and 0 deletions
26
scripts/bash/task_functions.sh
Normal file
26
scripts/bash/task_functions.sh
Normal file
|
@ -0,0 +1,26 @@
|
|||
CONFIRM_PROMPT='are you sure'
|
||||
task_config ()
|
||||
{
|
||||
var="${1}"
|
||||
shift
|
||||
value="${@}"
|
||||
echo y | task config $var "$value" | grep -iv "$CONFIRM_PROMPT"
|
||||
}
|
||||
task_vars ()
|
||||
{
|
||||
task _show | grep "^.*${1}.*=" | cut -d'=' -f1
|
||||
}
|
||||
task_get ()
|
||||
{
|
||||
task _show | grep "^${1}=" | cut -d'=' -f2
|
||||
}
|
||||
task_color ()
|
||||
{
|
||||
color="${1}"
|
||||
shift
|
||||
text="${@}"
|
||||
task rc.verbose=nothing rc._forcecolor=yes color ${color} | grep 'task color' | \
|
||||
tail -n 1 | sed -e 's/^ //' -e "s/task color ${color}/${text}/"
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue