Previous part: Command line task manager - 4

In this part we let users to switch task statuses.

At first, there should be available commands:

type Command = Move `ML` Mark
 
pattern Move x = This x
pattern Mark x = That x

We can introduce such an internal convention - lowercase letter commands do not change the state:

apply = is @(ASCII `MN` Glyph `ML_` Glyph `MN` Letter) `hu` Wrong Unit
 `la____` press `hv` Lower J `hv` (Move `ha` Down)
 `lo'ys'la` press `hv` Lower K `hv` (Move `ha` Lift)
 `lo'ys'la` press `hv` Upper T `hv` (Mark `ha` TODO)
 `lo'ys'la` press `hv` Upper D `hv` (Mark `ha` DONE)

The last step - interpretation. We can switch a focused task’s status, but we should zoom in a modified state:

 `yok___` State `ho` New `ha__` Event `ha` (scroll `ho'ho'yui` Unit)
  `la___` State `ho` New `ha__` Event `ha` (switch `ho'ho'yui` Unit)
`ho_'ha'he` Scope `hv` at @(Focused Task) `ho'he` (Scope `hv` at @Mark)

Next time we will introduce subtasks.

Full source code is available here.

Continue this tutorial