Skip to content

Commit

Permalink
Altering some command usage docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Nov 24, 2009
1 parent 96566c1 commit 48a8113
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions bin/pomo
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,18 @@ end

command :edit do |c|
c.syntax = 'pomo edit [task ...] [options]'
c.summary = 'Edit a task'
c.description = 'Change some of the values for a task'
c.summary = 'Edit tasks'
c.description = 'Edit the given task(s) or the first task'
c.example 'Changes the description for the first task', 'pomo edit first -d "fix IE styling issues"'
c.example 'Changes the description and length for the third task', 'pomo edit 3 -d "fix IE styling issues" -l 60'
c.example 'Changes the length of several tasks', 'pomo edit 1..5 -l 10'
c.option '-n', '--name string', 'Change the task name'
c.option '-d', '--description string', 'Change the task description'
c.option '-l', '--length minutes', Integer, 'Change the task length'
c.action do |args, options|
list.find(*args) do |task, i|
options.__hash__.each do |key, value|
task.send "#{key}=", value
task.send :"#{key}=", value
end
say " - Updated #{task}"
end
Expand All @@ -140,8 +141,8 @@ end

command :remove do |c|
c.syntax = 'pomo [remove|rm] [task ...] [options]'
c.summary = 'Remove a task'
c.description = 'Remove a task, given the task(s) or the first task'
c.summary = 'Remove tasks'
c.description = 'Remove task(s) or the first task'
c.example 'Remove the first task', 'pomo remove first'
c.example 'Remove the last task', 'pomo remove last'
c.example 'Remove the fifth task', 'pomo remove 5'
Expand All @@ -162,7 +163,7 @@ alias_command :clear, :remove, 'all'

command :view do |c|
c.syntax = 'pomo view [task ...] [options]'
c.summary = 'View a task'
c.summary = 'View verbose task information'
c.description = 'View verbose information for the given task(s) or the first task'
c.example 'View the first task', 'pomo view first'
c.example 'View the last task', 'pomo view last'
Expand All @@ -186,7 +187,7 @@ end

command :complete do |c|
c.syntax = 'pomo complete [task ...] [options]'
c.summary = 'Mark a task as completed'
c.summary = 'Mark tasks as completed'
c.description = 'Mark the given task(s) or the first task to complete'
c.example 'Mark first task as complete', 'pomo complete first'
c.example 'Mark last task as complete', 'pomo complete last'
Expand All @@ -202,15 +203,15 @@ end

command :incomplete do |c|
c.syntax = 'pomo incomplete [task ...] [options]'
c.summary = 'Mark a task as not completed'
c.summary = 'Mark tasks as incompleted'
c.description = 'Mark the given task(s) or the first task as not completed'
c.example 'Mark first task as not completed', 'pomo incomplete first'
c.example 'Mark last task as not completed', 'pomo incomplete last'
c.example 'Mark fifth task as not completed', 'pomo incomplete 5'
c.action do |args, options|
list.find(*args) do |task, i|
task.complete = false
say " - #{task} marked as not complete"
say " - #{task} marked incomplete"
end
list.save
end
Expand Down

0 comments on commit 48a8113

Please sign in to comment.