Code Review
/
common
/
bash_it.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
57283d7
)
conditionally define t()
author
Erich Smith
<heartquest@gmail.com>
Fri, 18 May 2012 01:40:08 +0000
(21:40 -0400)
committer
Erich Smith
<heartquest@gmail.com>
Fri, 18 May 2012 01:40:08 +0000
(21:40 -0400)
if user has installed the todo plugin, forego defining the 'one thing'
todo function t().
plugins/available/base.plugin.bash
patch
|
blob
|
history
diff --git
a/plugins/available/base.plugin.bash
b/plugins/available/base.plugin.bash
index
a80c216
..
137b812
100755
(executable)
--- a/
plugins/available/base.plugin.bash
+++ b/
plugins/available/base.plugin.bash
@@
-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