conditionally define t()

if user has enabled the todo plugin, skip defining the 'one thing'
todo function t().
This commit is contained in:
Erich Smith
2012-05-17 21:43:57 -04:00
6 changed files with 1538 additions and 13 deletions

View File

@@ -151,18 +151,20 @@ usage ()
fi
}
t ()
{
about 'one thing todo'
param 'if not set, display todo item'
param '1: todo text'
group 'base'
if [[ "$*" == "" ]] ; then
cat ~/.t
else
echo "$*" > ~/.t
fi
}
if [ ! -e $BASH_IT/plugins/enabled/todo.plugin.bash ]; then
# if user has installed todo plugin, skip this...
t ()
{
about 'one thing todo'
param 'if not set, display todo item'
param '1: todo text'
if [[ "$*" == "" ]] ; then
cat ~/.t
else
echo "$*" > ~/.t
fi
}
fi
command_exists ()
{