Skip to content

Commit

Permalink
conditionally define t()
Browse files Browse the repository at this point in the history
if user has installed the todo plugin, forego defining the 'one thing'
todo function t().
  • Loading branch information
erichs committed May 18, 2012
1 parent 57283d7 commit dd9fb10
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions plugins/available/base.plugin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,21 @@ usage ()
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 ()
{
about checks for existence of a command
Expand Down

0 comments on commit dd9fb10

Please sign in to comment.