Initial support for context and focus (see Issue #218).

This commit is contained in:
Ben Armstrong 2013-08-21 18:05:08 -03:00 committed by Paul Beckingham
parent 235fb9f054
commit ac811c6930
4 changed files with 64 additions and 0 deletions

View 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}/"
}