Skip to content

Commit

Permalink
Document new edit behavior
Browse files Browse the repository at this point in the history
Issue #54
  • Loading branch information
Sam Goldstein committed Nov 17, 2012
1 parent 59a3069 commit 36a79dc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -57,13 +57,19 @@ If you make a mistake use the `edit` command.


$ # edit the running entry's note $ # edit the running entry's note
$ t edit writing readme $ t edit writing readme
editing entry #42 Editing running entry


You check out with the `out` command. You check out with the `out` command.


$ t out $ t out
Checked out of sheet "coding" Checked out of sheet "coding"


Running `edit` when you're checked out will edit the last sheet you checked out
of.

$ t edit --append "oh and that"
Editing last entry you checked out of

You can edit entries that aren't running using `edit`'s `--id` or `-i` flag. You can edit entries that aren't running using `edit`'s `--id` or `-i` flag.
`t display --ids` (or `t display -v`) will tell you the ids. `t display --ids` (or `t display -v`) will tell you the ids.


Expand All @@ -78,7 +84,7 @@ You can edit entries that aren't running using `edit`'s `--id` or `-i` flag.


$ # -i43 to edit entry 43 $ # -i43 to edit entry 43
$ t e -i43 --end "2010-11-28 13:45" $ t e -i43 --end "2010-11-28 13:45"
editing entry #43 Editing entry with id 43


$ t d $ t d
Timesheet: coding Timesheet: coding
Expand Down Expand Up @@ -264,8 +270,8 @@ Commands


**edit** **edit**
Inserts a note associated with the an entry in the timesheet, or edits the Inserts a note associated with the an entry in the timesheet, or edits the
start or end times. Defaults to the current time although an ``--id`` flag can start or end times. Defaults to the current entry, or previously running
be passed with the entry's id (see display.) entry. An ``--id`` flag can be passed with the entry's id (see display.)


usage: ``t edit [--id ID] [--start TIME] [--end TIME] [--append] [NOTES]`` usage: ``t edit [--id ID] [--start TIME] [--end TIME] [--append] [NOTES]``


Expand Down
3 changes: 2 additions & 1 deletion lib/timetrap/cli.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ module CLI
found in the README included in this found in the README included in this
distribution. distribution.
* edit - Alter an entry's note, start, or end time. Defaults to the active entry. * edit - Alter an entry's note, start, or end time. Defaults to the active
entry. Defaults to the last entry to be checked out of if no entry is active.
usage: t edit [--id ID] [--start TIME] [--end TIME] [--append] [NOTES] usage: t edit [--id ID] [--start TIME] [--end TIME] [--append] [NOTES]
-i, --id <id:i> Alter entry with id <id> instead of the running entry -i, --id <id:i> Alter entry with id <id> instead of the running entry
-s, --start <time:qs> Change the start time to <time> -s, --start <time:qs> Change the start time to <time>
Expand Down

0 comments on commit 36a79dc

Please sign in to comment.