if optional positional arg is todo/scheduled/done, then resolve first level
parent
10b95672e3
commit
492e0af993
|
|
@ -137,7 +137,17 @@ func dump(dry bool, writer io.Writer, filepath string) error {
|
|||
}
|
||||
root.MoveScheduledToTodo()
|
||||
|
||||
b2, err := yaml.Marshal(root)
|
||||
var v interface{} = root
|
||||
switch flag.Arg(0) {
|
||||
case "":
|
||||
case "todo":
|
||||
v = root.Todo
|
||||
case "scheduled":
|
||||
v = root.Scheduled
|
||||
case "done":
|
||||
v = root.Done
|
||||
}
|
||||
b2, err := yaml.Marshal(v)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue