... | ... |
@@ -1,24 +1,3 @@ |
1 |
-_rake_does_task_list_need_generating () { |
|
2 |
- if [ ! -f .rake_tasks~ ]; then return 0; |
|
3 |
- else |
|
4 |
- accurate=$(stat -f%m .rake_tasks~) |
|
5 |
- changed=$(stat -f%m Rakefile) |
|
6 |
- return $(expr $accurate '>=' $changed) |
|
7 |
- fi |
|
8 |
-} |
|
9 |
- |
|
10 |
-_rake () { |
|
11 |
- if [ -f Rakefile ]; then |
|
12 |
- if _rake_does_task_list_need_generating; then |
|
13 |
- echo "\nGenerating .rake_tasks~..." > /dev/stderr |
|
14 |
- rake --silent --tasks | cut -d " " -f 2 > .rake_tasks~ |
|
15 |
- fi |
|
16 |
- compadd `cat .rake_tasks~` |
|
17 |
- fi |
|
18 |
-} |
|
19 |
- |
|
20 |
-compctl -K _rake rake |
|
21 |
- |
|
22 | 1 |
function _cap_does_task_list_need_generating () { |
23 | 2 |
if [ ! -f .cap_tasks~ ]; then return 0; |
24 | 3 |
else |