conditionally define t()
if user has enabled the todo plugin, skip defining the 'one thing' todo function t().
This commit is contained in:
@@ -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 ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user