todo.rb 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,16 +45,16 @@ elsif command == 'all'
45
45
  elsif command == 'do'
46
46
  t.mark_done! args[0]
47
47
  elsif command == 'undo'
48
- t.mark_undone! args[0]
48
+ t.mark_undone! args[0] # can be number or /regex/
49
49
  elsif command == 'report' && args.empty?
50
50
  t.report
51
- elsif command == 'revert' && args.empty?
51
+ elsif command == 'revert' && args.empty? # not necessary, really
52
52
  t.revert
53
- elsif command == 'diff' && args.empty?
53
+ elsif command == 'diff' && args.empty? # rarely used
54
54
  t.diff
55
- elsif command == 'pri' && args[0] =~ /^\d+$/
56
- t.ed_command! "#{args[0]}s/$/!/\nm0"
57
- elsif command == 'depri' && args[0] =~ /^\d+$/
55
+ elsif command == 'pri' && args[0]
56
+ t.ed_command! "#{args[0]}s/$/ !/\nm0"
57
+ elsif command == 'depri' && args[0]
58
58
  t.ed_command! "#{args[0]}s/!//g\nm/^[^!]*$/-1"
59
59
  elsif command.nil?
60
60
  t.catn
@@ -11,22 +11,26 @@ todo.rb operates in the current working directory. It will create a todo.txt
11
11
  and done.txt file to store tasks.
12
12
 
13
13
  The following assumes that `alias t=todo.rb` is in effect.
14
+
14
15
  A [tag] may be a @context or a +project.
15
16
 
16
- t [tag] [task text] append a task with tag
17
- t show tasks
18
- t [ed command] perform ed command on todo list
19
- t done show done tasks
20
- t do [task number] move a task to the done.txt
21
- t undo [task number] move a task from done.txt to todo.txt
22
- t [tag] filter tasks by tag
23
- t pri [task number] prioritize a task
24
- t depri [task number] deprioritize a task
25
- t ! show high priority tasks
26
- t ! [tag] show high priority tasks for a tag
27
- t report show task report
28
- t all list all incomplete and done tasks
29
- t all [tag] ditto, but filter by tag
17
+ And [address] can be a line number or a regular expression that matches the
18
+ task.
19
+
20
+ t [tag] [task text] append a task with tag
21
+ t show tasks
22
+ t [ed command] perform ed command on todo list
23
+ t done show done tasks
24
+ t do [task address] move a task to the done.txt
25
+ t undo [task address] move a task from done.txt to todo.txt
26
+ t [tag] filter tasks by tag
27
+ t pri [task address] prioritize a task
28
+ t depri [task address] deprioritize a task
29
+ t ! show high priority tasks
30
+ t ! [tag] show high priority tasks for a tag
31
+ t report show task report
32
+ t all list all incomplete and done tasks
33
+ t all [tag] ditto, but filter by tag
30
34
 
31
35
 
32
36
  Tag colors can be customized in colors.yml. It may look something like this.
@@ -1,3 +1,3 @@
1
1
  class TodoRb
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: todo.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-30 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline
16
- requirement: &70152202274620 !ruby/object:Gem::Requirement
16
+ requirement: &70260678819160 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.6.11
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70152202274620
24
+ version_requirements: *70260678819160
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: color-tools
27
- requirement: &70152202273760 !ruby/object:Gem::Requirement
27
+ requirement: &70260678818600 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '1.3'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70152202273760
35
+ version_requirements: *70260678818600
36
36
  description: ed-like todo list manager
37
37
  email:
38
38
  - dhchoi@gmail.com